From 393dc6eaf8d5a119c9cf71f1f5dac44abf70db59 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 2 Dec 2015 21:00:30 -0500 Subject: build.. --- .../user.xcuserdatad/xcschemes/CordovaLib.xcscheme | 77 +++ .../xcschemes/xcschememanagement.plist | 22 + .../ios/Stone Island.xcodeproj/project.pbxproj | 674 +++++++++++++++++++ .../project.xcworkspace/contents.xcworkspacedata | 7 + .../xcshareddata/StoneIsland.xccheckout | 41 ++ .../UserInterfaceState.xcuserstate | Bin 0 -> 13567 bytes .../UserInterfaceState.xcuserstate | Bin 0 -> 9021 bytes StoneIsland/platforms/ios/Stone Island/.gitignore | 5 + .../ios/Stone Island/Classes/AppDelegate.h | 42 ++ .../ios/Stone Island/Classes/AppDelegate.m | 151 +++++ .../ios/Stone Island/Classes/MainViewController.h | 40 ++ .../ios/Stone Island/Classes/MainViewController.m | 164 +++++ .../Stone Island/Classes/MainViewController.xib | 138 ++++ .../platforms/ios/Stone Island/Plugins/README | 20 + .../Plugins/com.ionic.keyboard/IonicKeyboard.h | 13 + .../Plugins/com.ionic.keyboard/IonicKeyboard.m | 160 +++++ .../com.ionic.keyboard/UIWebViewExtension.h | 4 + .../com.ionic.keyboard/UIWebViewExtension.m | 109 ++++ .../Plugins/cordova-plugin-console/CDVLogger.h | 26 + .../Plugins/cordova-plugin-console/CDVLogger.m | 38 ++ .../Plugins/cordova-plugin-device/CDVDevice.h | 30 + .../Plugins/cordova-plugin-device/CDVDevice.m | 99 +++ .../cordova-plugin-dialogs/CDVNotification.h | 37 ++ .../cordova-plugin-dialogs/CDVNotification.m | 221 +++++++ .../cordova-plugin-geolocation/CDVLocation.h | 70 ++ .../cordova-plugin-geolocation/CDVLocation.m | 366 +++++++++++ .../CDVConnection.h | 34 + .../CDVConnection.m | 127 ++++ .../CDVReachability.h | 85 +++ .../CDVReachability.m | 260 ++++++++ .../cordova-plugin-splashscreen/CDVSplashScreen.h | 43 ++ .../cordova-plugin-splashscreen/CDVSplashScreen.m | 330 ++++++++++ .../CDVViewController+SplashScreen.h | 28 + .../CDVViewController+SplashScreen.m | 82 +++ .../cordova-plugin-x-socialsharing/SocialSharing.h | 27 + .../cordova-plugin-x-socialsharing/SocialSharing.m | 715 +++++++++++++++++++++ .../AppDelegate+notification.h | 21 + .../AppDelegate+notification.m | 167 +++++ .../Plugins/phonegap-plugin-push/PushPlugin.h | 62 ++ .../Plugins/phonegap-plugin-push/PushPlugin.m | 347 ++++++++++ .../Resources/CDVNotification.bundle/beep.wav | Bin 0 -> 8114 bytes .../Resources/splash/Default-568h@2x~iphone.png | Bin 0 -> 34225 bytes .../Stone Island/Resources/splash/Default-667h.png | Bin 0 -> 57532 bytes .../Stone Island/Resources/splash/Default-736h.png | Bin 0 -> 80929 bytes .../Resources/splash/Default-Landscape-736h.png | Bin 0 -> 79491 bytes .../Resources/splash/Default-Landscape@2x~ipad.png | Bin 0 -> 212234 bytes .../Resources/splash/Default-Landscape~ipad.png | Bin 0 -> 91810 bytes .../Resources/splash/Default-Portrait@2x~ipad.png | Bin 0 -> 212860 bytes .../Resources/splash/Default-Portrait~ipad.png | Bin 0 -> 91713 bytes .../Resources/splash/Default@2x~iphone.png | Bin 0 -> 29475 bytes .../Resources/splash/Default~iphone.png | Bin 0 -> 10394 bytes .../ios/Stone Island/Stone Island-Info.plist | 195 ++++++ .../ios/Stone Island/Stone Island-Prefix.pch | 26 + StoneIsland/platforms/ios/Stone Island/config.xml | 73 +++ StoneIsland/platforms/ios/Stone Island/main.m | 35 + .../ios/StoneIsland.xcodeproj/project.pbxproj | 676 ------------------- .../project.xcworkspace/contents.xcworkspacedata | 7 - .../xcshareddata/StoneIsland.xccheckout | 41 -- .../UserInterfaceState.xcuserstate | Bin 13567 -> 0 bytes .../xcschemes/StoneIsland.xcscheme | 88 --- .../xcschemes/xcschememanagement.plist | 22 - StoneIsland/platforms/ios/StoneIsland/.gitignore | 5 - .../ios/StoneIsland/Classes/AppDelegate.h | 42 -- .../ios/StoneIsland/Classes/AppDelegate.m | 151 ----- .../ios/StoneIsland/Classes/MainViewController.h | 40 -- .../ios/StoneIsland/Classes/MainViewController.m | 164 ----- .../ios/StoneIsland/Classes/MainViewController.xib | 138 ---- .../platforms/ios/StoneIsland/Plugins/README | 20 - .../Plugins/com.ionic.keyboard/IonicKeyboard.h | 13 - .../Plugins/com.ionic.keyboard/IonicKeyboard.m | 160 ----- .../com.ionic.keyboard/UIWebViewExtension.h | 4 - .../com.ionic.keyboard/UIWebViewExtension.m | 109 ---- .../Plugins/cordova-plugin-console/CDVLogger.h | 26 - .../Plugins/cordova-plugin-console/CDVLogger.m | 38 -- .../Plugins/cordova-plugin-device/CDVDevice.h | 30 - .../Plugins/cordova-plugin-device/CDVDevice.m | 99 --- .../cordova-plugin-dialogs/CDVNotification.h | 37 -- .../cordova-plugin-dialogs/CDVNotification.m | 221 ------- .../cordova-plugin-geolocation/CDVLocation.h | 70 -- .../cordova-plugin-geolocation/CDVLocation.m | 366 ----------- .../CDVConnection.h | 34 - .../CDVConnection.m | 127 ---- .../CDVReachability.h | 85 --- .../CDVReachability.m | 260 -------- .../cordova-plugin-splashscreen/CDVSplashScreen.h | 43 -- .../cordova-plugin-splashscreen/CDVSplashScreen.m | 330 ---------- .../CDVViewController+SplashScreen.h | 28 - .../CDVViewController+SplashScreen.m | 82 --- .../cordova-plugin-x-socialsharing/SocialSharing.h | 27 - .../cordova-plugin-x-socialsharing/SocialSharing.m | 715 --------------------- .../AppDelegate+notification.h | 21 - .../AppDelegate+notification.m | 167 ----- .../Plugins/phonegap-plugin-push/PushPlugin.h | 62 -- .../Plugins/phonegap-plugin-push/PushPlugin.m | 347 ---------- .../Resources/CDVNotification.bundle/beep.wav | Bin 8114 -> 0 bytes .../Resources/splash/Default-568h@2x~iphone.png | Bin 34225 -> 0 bytes .../StoneIsland/Resources/splash/Default-667h.png | Bin 57532 -> 0 bytes .../StoneIsland/Resources/splash/Default-736h.png | Bin 80929 -> 0 bytes .../Resources/splash/Default-Landscape-736h.png | Bin 79491 -> 0 bytes .../Resources/splash/Default-Landscape@2x~ipad.png | Bin 212234 -> 0 bytes .../Resources/splash/Default-Landscape~ipad.png | Bin 91810 -> 0 bytes .../Resources/splash/Default-Portrait@2x~ipad.png | Bin 212860 -> 0 bytes .../Resources/splash/Default-Portrait~ipad.png | Bin 91713 -> 0 bytes .../Resources/splash/Default@2x~iphone.png | Bin 29475 -> 0 bytes .../Resources/splash/Default~iphone.png | Bin 10394 -> 0 bytes .../ios/StoneIsland/StoneIsland-Info.plist | 201 ------ .../ios/StoneIsland/StoneIsland-Prefix.pch | 26 - StoneIsland/platforms/ios/StoneIsland/config.xml | 73 --- StoneIsland/platforms/ios/StoneIsland/main.m | 35 - StoneIsland/platforms/ios/frameworks.json | 7 + StoneIsland/platforms/ios/ios.json | 247 +++++++ .../platforms/ios/platform_www/cordova_plugins.js | 141 ++++ .../plugins/com.ionic.keyboard/www/keyboard.js | 39 ++ .../www/console-via-logger.js | 189 ++++++ .../plugins/cordova-plugin-console/www/logger.js | 357 ++++++++++ .../www/ios/LaunchMyApp.js | 11 + .../plugins/cordova-plugin-device/www/device.js | 81 +++ .../cordova-plugin-dialogs/www/notification.js | 114 ++++ .../cordova-plugin-geolocation/www/Coordinates.js | 71 ++ .../cordova-plugin-geolocation/www/Position.js | 35 + .../www/PositionError.js | 40 ++ .../cordova-plugin-geolocation/www/geolocation.js | 213 ++++++ .../www/Connection.js | 36 ++ .../www/network.js | 93 +++ .../www/splashscreen.js | 35 + .../www/SocialSharing.js | 117 ++++ .../plugins/phonegap-plugin-push/www/push.js | 231 +++++++ StoneIsland/platforms/ios/www/cordova_plugins.js | 15 + StoneIsland/platforms/ios/www/css/account.css | 66 +- StoneIsland/platforms/ios/www/css/blogs.css | 24 +- StoneIsland/platforms/ios/www/css/cart.css | 151 +++-- StoneIsland/platforms/ios/www/css/nav.css | 13 +- StoneIsland/platforms/ios/www/css/products.css | 43 +- StoneIsland/platforms/ios/www/db.json | 485 ++++++++++++++ StoneIsland/platforms/ios/www/index.html | 76 ++- StoneIsland/platforms/ios/www/js/index.js | 14 +- StoneIsland/platforms/ios/www/js/lib/_router.js | 1 + .../platforms/ios/www/js/lib/auth/SignupView.js | 15 +- .../platforms/ios/www/js/lib/blogs/ArchiveView.js | 79 ++- .../platforms/ios/www/js/lib/blogs/BlogView.js | 11 +- .../platforms/ios/www/js/lib/blogs/HubView.js | 33 +- .../platforms/ios/www/js/lib/cart/CartConfirm.js | 146 ++++- .../platforms/ios/www/js/lib/cart/CartError.js | 28 + .../platforms/ios/www/js/lib/cart/CartPayment.js | 81 ++- .../platforms/ios/www/js/lib/cart/CartShipping.js | 25 +- .../platforms/ios/www/js/lib/cart/CartSummary.js | 10 +- .../platforms/ios/www/js/lib/cart/CartView.js | 2 + .../platforms/ios/www/js/lib/nav/CreditCardView.js | 1 + .../ios/www/js/lib/products/GalleryView.js | 8 +- .../ios/www/js/lib/products/ProductView.js | 9 +- .../platforms/ios/www/js/lib/view/Serializable.js | 9 +- 151 files changed, 8412 insertions(+), 5431 deletions(-) create mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme create mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 StoneIsland/platforms/ios/Stone Island/.gitignore create mode 100644 StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.xib create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/README create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m create mode 100755 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h create mode 100755 StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.h create mode 100644 StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.m create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/CDVNotification.bundle/beep.wav create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-568h@2x~iphone.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-667h.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-736h.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape-736h.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape@2x~ipad.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape~ipad.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait@2x~ipad.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait~ipad.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default@2x~iphone.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/splash/Default~iphone.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist create mode 100644 StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch create mode 100755 StoneIsland/platforms/ios/Stone Island/config.xml create mode 100644 StoneIsland/platforms/ios/Stone Island/main.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.pbxproj delete mode 100644 StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout delete mode 100644 StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/StoneIsland.xcscheme delete mode 100644 StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 StoneIsland/platforms/ios/StoneIsland/.gitignore delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.xib delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/README delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m delete mode 100755 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h delete mode 100755 StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.h delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.m delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/CDVNotification.bundle/beep.wav delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-568h@2x~iphone.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-667h.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-736h.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape-736h.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape@2x~ipad.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape~ipad.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait@2x~ipad.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait~ipad.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default@2x~iphone.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default~iphone.png delete mode 100644 StoneIsland/platforms/ios/StoneIsland/StoneIsland-Info.plist delete mode 100644 StoneIsland/platforms/ios/StoneIsland/StoneIsland-Prefix.pch delete mode 100755 StoneIsland/platforms/ios/StoneIsland/config.xml delete mode 100644 StoneIsland/platforms/ios/StoneIsland/main.m create mode 100644 StoneIsland/platforms/ios/frameworks.json create mode 100644 StoneIsland/platforms/ios/ios.json create mode 100644 StoneIsland/platforms/ios/platform_www/cordova_plugins.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/com.ionic.keyboard/www/keyboard.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/console-via-logger.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/logger.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-device/www/device.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-dialogs/www/notification.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-geolocation/www/Coordinates.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-geolocation/www/Position.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-geolocation/www/PositionError.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-geolocation/www/geolocation.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/Connection.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/network.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-splashscreen/www/splashscreen.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js create mode 100644 StoneIsland/platforms/ios/platform_www/plugins/phonegap-plugin-push/www/push.js create mode 100644 StoneIsland/platforms/ios/www/db.json create mode 100644 StoneIsland/platforms/ios/www/js/lib/cart/CartError.js diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme new file mode 100644 index 00000000..5b0b1fda --- /dev/null +++ b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..283503be --- /dev/null +++ b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + CordovaLib.xcscheme + + orderHint + 1 + + + SuppressBuildableAutocreation + + D2AAC07D0554694100DB518D + + primary + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj new file mode 100644 index 00000000..60c6e49d --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj @@ -0,0 +1,674 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { +/* Begin PBXBuildFile section */ + 05EBE3ED6EA64212BCC52906 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270ADA31CA7B4A42B185E451 /* AudioToolbox.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; + 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; + 28FA0D2F417F4E6891D4A2A3 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E63CFDA045E649E8A2E41A6E /* SystemConfiguration.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; }; + 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; + 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; + 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; }; + 3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */; }; + 3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */; }; + 3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */; }; + 3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */; }; + 3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */; }; + 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBC154F3926009F9C59 /* Default~iphone.png */; }; + 308D05371370CCF300D202BF /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052E1370CCF300D202BF /* icon-72.png */; }; + 308D05381370CCF300D202BF /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052F1370CCF300D202BF /* icon.png */; }; + 308D05391370CCF300D202BF /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D05301370CCF300D202BF /* icon@2x.png */; }; + 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */; }; + 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */; }; + 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; }; + 30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30C1856519D5FC0A00212699 /* icon-60@3x.png */; }; + 30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon-72@2x.png */; }; + 4C059853D8B843F88F01C944 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A186FB94DE714DEC95EA29D9 /* MessageUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; }; + 7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; }; + 7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D51810823500FA85AD /* icon-40@2x.png */; }; + 7E7966E01810823500FA85AD /* icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D61810823500FA85AD /* icon-50.png */; }; + 7E7966E11810823500FA85AD /* icon-50@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D71810823500FA85AD /* icon-50@2x.png */; }; + 7E7966E21810823500FA85AD /* icon-60.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D81810823500FA85AD /* icon-60.png */; }; + 7E7966E31810823500FA85AD /* icon-60@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D91810823500FA85AD /* icon-60@2x.png */; }; + 7E7966E41810823500FA85AD /* icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DA1810823500FA85AD /* icon-76.png */; }; + 7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DB1810823500FA85AD /* icon-76@2x.png */; }; + 7E7966E61810823500FA85AD /* icon-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DC1810823500FA85AD /* icon-small.png */; }; + 7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DD1810823500FA85AD /* icon-small@2x.png */; }; + 85552B118FDD4F9286C3D33C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88109882DED84831BEC5BBB0 /* CoreLocation.framework */; }; + 98F1852ABB5E4B118CC6C27B /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88275732925E4321970403F3 /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */; }; + 7A5729AE550743E8897FEFAC /* IonicKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = B5F16B6351724CACB3931F57 /* IonicKeyboard.m */; }; + 884B7DE1CA8D4BF6A05FA8A7 /* UIWebViewExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = C666C4C9CDB74660A40173A8 /* UIWebViewExtension.m */; }; + 8F9C2C1B292E4E24B625BDCD /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = BE082DE7F9E14BBB911D13D7 /* CDVLogger.m */; }; + E301F0EFEA0F4AE591CD6383 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = A773BF3EDF674B439F36D6F6 /* CDVDevice.m */; }; + 900CDEE3AC16432C9F7FA9C0 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F88EEB515154479BC3036ED /* CDVNotification.m */; }; + 8C7A214013CE439381D8EFA5 /* CDVNotification.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 27FCFD984A2D4C59AFA2A973 /* CDVNotification.bundle */; }; + ADE60A85B8184E6F9EEBBCFB /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = CD0AE4A1D47F4FEEA25B3504 /* CDVLocation.m */; }; + B35136AD62114038A8B7792F /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 30E2710C47164820BA0D2C37 /* CDVConnection.m */; }; + 28C7BF9E95C74BDBAFE9EDBA /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A2A4F00E6614CCB9FFD82D3 /* CDVReachability.m */; }; + 3ACFAEAFE74B4E51A4C86ED6 /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 067CCB0A5E3A4E9185421102 /* CDVSplashScreen.m */; }; + 975A6258D55048DB90E5144A /* CDVViewController+SplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = F877B874929A4D2990C33A65 /* CDVViewController+SplashScreen.m */; }; + F6FB47A99F304BFBA7154086 /* AppDelegate+notification.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE352062EC1488886B68EDE /* AppDelegate+notification.m */; }; + B7B78ADD10614527873A2D16 /* PushPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B72FA2150AB455799F0F791 /* PushPlugin.m */; }; + CEFCDB7C540D4365B8629E85 /* SocialSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = DDA9F9E7CF054ABD9DD2698E /* SocialSharing.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D2AAC07E0554694100DB518D; + remoteInfo = CordovaLib; + }; + 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D2AAC07D0554694100DB518D; + remoteInfo = CordovaLib; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 1D6058910D05DD3D006BFB54 /* Stone Island.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Stone Island.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 270ADA31CA7B4A42B185E451 /* AudioToolbox.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; + 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; + 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; + 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; + 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; + 302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; + 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; + 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = ""; }; + 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = ""; }; + 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = ""; }; + 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = ""; }; + 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x~iphone.png"; sourceTree = ""; }; + 3088BBBC154F3926009F9C59 /* Default~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default~iphone.png"; sourceTree = ""; }; + 308D052E1370CCF300D202BF /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72.png"; sourceTree = ""; }; + 308D052F1370CCF300D202BF /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; + 308D05301370CCF300D202BF /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon@2x.png"; sourceTree = ""; }; + 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h.png"; sourceTree = ""; }; + 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h.png"; sourceTree = ""; }; + 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape-736h.png"; sourceTree = ""; }; + 30C1856519D5FC0A00212699 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = ""; }; + 30FC414816E50CA1004E6F35 /* icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72@2x.png"; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* Stone Island-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Stone Island-Prefix.pch"; sourceTree = ""; }; + 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; + 7E7966D41810823500FA85AD /* icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40.png"; sourceTree = ""; }; + 7E7966D51810823500FA85AD /* icon-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40@2x.png"; sourceTree = ""; }; + 7E7966D61810823500FA85AD /* icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50.png"; sourceTree = ""; }; + 7E7966D71810823500FA85AD /* icon-50@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50@2x.png"; sourceTree = ""; }; + 7E7966D81810823500FA85AD /* icon-60.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60.png"; sourceTree = ""; }; + 7E7966D91810823500FA85AD /* icon-60@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@2x.png"; sourceTree = ""; }; + 7E7966DA1810823500FA85AD /* icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-76.png"; sourceTree = ""; }; + 7E7966DB1810823500FA85AD /* icon-76@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-76@2x.png"; sourceTree = ""; }; + 7E7966DC1810823500FA85AD /* icon-small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small.png"; sourceTree = ""; }; + 7E7966DD1810823500FA85AD /* icon-small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small@2x.png"; sourceTree = ""; }; + 88109882DED84831BEC5BBB0 /* CoreLocation.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = System/Library/Frameworks/CoreLocation.framework; sourceTree = SDKROOT; }; + 88275732925E4321970403F3 /* Social.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; }; + 8D1107310486CEB800E47090 /* Stone Island-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "Stone Island-Info.plist"; path = "../Stone Island-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; + A186FB94DE714DEC95EA29D9 /* MessageUI.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; }; + D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = ""; }; + E63CFDA045E649E8A2E41A6E /* SystemConfiguration.framework */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; + EB87FDF21871DA7A0020F90C /* merges */ = {isa = PBXFileReference; lastKnownFileType = folder; name = merges; path = ../../merges; sourceTree = ""; }; + EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; + EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; + F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = Stone Island/config.xml; sourceTree = ""; }; + B5F16B6351724CACB3931F57 /* IonicKeyboard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "IonicKeyboard.m"; path = "com.ionic.keyboard/IonicKeyboard.m"; sourceTree = ""; fileEncoding = 4; }; + C666C4C9CDB74660A40173A8 /* UIWebViewExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "UIWebViewExtension.m"; path = "com.ionic.keyboard/UIWebViewExtension.m"; sourceTree = ""; fileEncoding = 4; }; + 6BCA7EFAF1B24ACEB7C0CF88 /* IonicKeyboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "IonicKeyboard.h"; path = "com.ionic.keyboard/IonicKeyboard.h"; sourceTree = ""; fileEncoding = 4; }; + 1342608C03934211BC5C0F67 /* UIWebViewExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UIWebViewExtension.h"; path = "com.ionic.keyboard/UIWebViewExtension.h"; sourceTree = ""; fileEncoding = 4; }; + BE082DE7F9E14BBB911D13D7 /* CDVLogger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVLogger.m"; path = "cordova-plugin-console/CDVLogger.m"; sourceTree = ""; fileEncoding = 4; }; + D3A8F9BC24DD400582D81F13 /* CDVLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVLogger.h"; path = "cordova-plugin-console/CDVLogger.h"; sourceTree = ""; fileEncoding = 4; }; + A773BF3EDF674B439F36D6F6 /* CDVDevice.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVDevice.m"; path = "cordova-plugin-device/CDVDevice.m"; sourceTree = ""; fileEncoding = 4; }; + 757469A9DDA04D668BD75ACA /* CDVDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVDevice.h"; path = "cordova-plugin-device/CDVDevice.h"; sourceTree = ""; fileEncoding = 4; }; + 8F88EEB515154479BC3036ED /* CDVNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVNotification.m"; path = "cordova-plugin-dialogs/CDVNotification.m"; sourceTree = ""; fileEncoding = 4; }; + 5FC42652AF444079AF2218F1 /* CDVNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVNotification.h"; path = "cordova-plugin-dialogs/CDVNotification.h"; sourceTree = ""; fileEncoding = 4; }; + 27FCFD984A2D4C59AFA2A973 /* CDVNotification.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = "CDVNotification.bundle"; path = "CDVNotification.bundle"; sourceTree = ""; }; + CD0AE4A1D47F4FEEA25B3504 /* CDVLocation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVLocation.m"; path = "cordova-plugin-geolocation/CDVLocation.m"; sourceTree = ""; fileEncoding = 4; }; + 930ABD693D574CC5B93C1570 /* CDVLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVLocation.h"; path = "cordova-plugin-geolocation/CDVLocation.h"; sourceTree = ""; fileEncoding = 4; }; + 30E2710C47164820BA0D2C37 /* CDVConnection.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVConnection.m"; path = "cordova-plugin-network-information/CDVConnection.m"; sourceTree = ""; fileEncoding = 4; }; + 9A2A4F00E6614CCB9FFD82D3 /* CDVReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVReachability.m"; path = "cordova-plugin-network-information/CDVReachability.m"; sourceTree = ""; fileEncoding = 4; }; + E2F7BAEE2CFC4EC1B4DA4533 /* CDVConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVConnection.h"; path = "cordova-plugin-network-information/CDVConnection.h"; sourceTree = ""; fileEncoding = 4; }; + 0D2D2A34ABDC4B33917C448A /* CDVReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVReachability.h"; path = "cordova-plugin-network-information/CDVReachability.h"; sourceTree = ""; fileEncoding = 4; }; + 067CCB0A5E3A4E9185421102 /* CDVSplashScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVSplashScreen.m"; path = "cordova-plugin-splashscreen/CDVSplashScreen.m"; sourceTree = ""; fileEncoding = 4; }; + F877B874929A4D2990C33A65 /* CDVViewController+SplashScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVViewController+SplashScreen.m"; path = "cordova-plugin-splashscreen/CDVViewController+SplashScreen.m"; sourceTree = ""; fileEncoding = 4; }; + D2928BBA3525494D9585B44A /* CDVSplashScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVSplashScreen.h"; path = "cordova-plugin-splashscreen/CDVSplashScreen.h"; sourceTree = ""; fileEncoding = 4; }; + 5B702706AD9B441F8750489B /* CDVViewController+SplashScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVViewController+SplashScreen.h"; path = "cordova-plugin-splashscreen/CDVViewController+SplashScreen.h"; sourceTree = ""; fileEncoding = 4; }; + 4BE352062EC1488886B68EDE /* AppDelegate+notification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "AppDelegate+notification.m"; path = "phonegap-plugin-push/AppDelegate+notification.m"; sourceTree = ""; fileEncoding = 4; }; + 3B72FA2150AB455799F0F791 /* PushPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "PushPlugin.m"; path = "phonegap-plugin-push/PushPlugin.m"; sourceTree = ""; fileEncoding = 4; }; + 4CD494FE8BFF478C8209E896 /* AppDelegate+notification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "AppDelegate+notification.h"; path = "phonegap-plugin-push/AppDelegate+notification.h"; sourceTree = ""; fileEncoding = 4; }; + A2A6CD3FCD7147ECA690247A /* PushPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "PushPlugin.h"; path = "phonegap-plugin-push/PushPlugin.h"; sourceTree = ""; fileEncoding = 4; }; + DDA9F9E7CF054ABD9DD2698E /* SocialSharing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "SocialSharing.m"; path = "cordova-plugin-x-socialsharing/SocialSharing.m"; sourceTree = ""; fileEncoding = 4; }; + D7ACBBDA868F4D38A9EE0543 /* SocialSharing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SocialSharing.h"; path = "cordova-plugin-x-socialsharing/SocialSharing.h"; sourceTree = ""; fileEncoding = 4; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */, + 301BF552109A68D80062928A /* libCordova.a in Frameworks */, + 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, + 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */, + 05EBE3ED6EA64212BCC52906 /* AudioToolbox.framework in Frameworks */, + 85552B118FDD4F9286C3D33C /* CoreLocation.framework in Frameworks */, + 28FA0D2F417F4E6891D4A2A3 /* SystemConfiguration.framework in Frameworks */, + 98F1852ABB5E4B118CC6C27B /* Social.framework in Frameworks */, + 4C059853D8B843F88F01C944 /* MessageUI.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* Classes */ = { + isa = PBXGroup; + children = ( + 302D95EE14D2391D003F00A1 /* MainViewController.h */, + 302D95EF14D2391D003F00A1 /* MainViewController.m */, + 302D95F014D2391D003F00A1 /* MainViewController.xib */, + 1D3623240D0F684500981E51 /* AppDelegate.h */, + 1D3623250D0F684500981E51 /* AppDelegate.m */, + ); + name = Classes; + path = Stone Island/Classes; + sourceTree = SOURCE_ROOT; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 1D6058910D05DD3D006BFB54 /* Stone Island.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { + isa = PBXGroup; + children = ( + EB87FDF41871DAF40020F90C /* config.xml */, + EB87FDF31871DA8E0020F90C /* www */, + EB87FDF21871DA7A0020F90C /* merges */, + EB87FDF11871DA420020F90C /* Staging */, + 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, + 080E96DDFE201D6D7F000001 /* Classes */, + 307C750510C5A3420062BCA9 /* Plugins */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = CustomTemplate; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* Stone Island-Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + path = Stone Island; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* Resources */ = { + isa = PBXGroup; + children = ( + 308D052D1370CCF300D202BF /* icons */, + 308D05311370CCF300D202BF /* splash */, + 8D1107310486CEB800E47090 /* Stone Island-Info.plist */, + 27FCFD984A2D4C59AFA2A973 /* CDVNotification.bundle */, + ); + name = Resources; + path = Stone Island/Resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */, + 288765FC0DF74451002DB57D /* CoreGraphics.framework */, + 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */, + 270ADA31CA7B4A42B185E451 /* AudioToolbox.framework */, + 88109882DED84831BEC5BBB0 /* CoreLocation.framework */, + E63CFDA045E649E8A2E41A6E /* SystemConfiguration.framework */, + 88275732925E4321970403F3 /* Social.framework */, + A186FB94DE714DEC95EA29D9 /* MessageUI.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 301BF52E109A57CC0062928A /* Products */ = { + isa = PBXGroup; + children = ( + 301BF535109A57CC0062928A /* libCordova.a */, + ); + name = Products; + sourceTree = ""; + }; + 307C750510C5A3420062BCA9 /* Plugins */ = { + isa = PBXGroup; + children = ( + B5F16B6351724CACB3931F57 /* IonicKeyboard.m */, + C666C4C9CDB74660A40173A8 /* UIWebViewExtension.m */, + 6BCA7EFAF1B24ACEB7C0CF88 /* IonicKeyboard.h */, + 1342608C03934211BC5C0F67 /* UIWebViewExtension.h */, + BE082DE7F9E14BBB911D13D7 /* CDVLogger.m */, + D3A8F9BC24DD400582D81F13 /* CDVLogger.h */, + A773BF3EDF674B439F36D6F6 /* CDVDevice.m */, + 757469A9DDA04D668BD75ACA /* CDVDevice.h */, + 8F88EEB515154479BC3036ED /* CDVNotification.m */, + 5FC42652AF444079AF2218F1 /* CDVNotification.h */, + CD0AE4A1D47F4FEEA25B3504 /* CDVLocation.m */, + 930ABD693D574CC5B93C1570 /* CDVLocation.h */, + 30E2710C47164820BA0D2C37 /* CDVConnection.m */, + 9A2A4F00E6614CCB9FFD82D3 /* CDVReachability.m */, + E2F7BAEE2CFC4EC1B4DA4533 /* CDVConnection.h */, + 0D2D2A34ABDC4B33917C448A /* CDVReachability.h */, + 067CCB0A5E3A4E9185421102 /* CDVSplashScreen.m */, + F877B874929A4D2990C33A65 /* CDVViewController+SplashScreen.m */, + D2928BBA3525494D9585B44A /* CDVSplashScreen.h */, + 5B702706AD9B441F8750489B /* CDVViewController+SplashScreen.h */, + 4BE352062EC1488886B68EDE /* AppDelegate+notification.m */, + 3B72FA2150AB455799F0F791 /* PushPlugin.m */, + 4CD494FE8BFF478C8209E896 /* AppDelegate+notification.h */, + A2A6CD3FCD7147ECA690247A /* PushPlugin.h */, + DDA9F9E7CF054ABD9DD2698E /* SocialSharing.m */, + D7ACBBDA868F4D38A9EE0543 /* SocialSharing.h */, + ); + name = Plugins; + path = Stone Island/Plugins; + sourceTree = SOURCE_ROOT; + }; + 308D052D1370CCF300D202BF /* icons */ = { + isa = PBXGroup; + children = ( + 30C1856519D5FC0A00212699 /* icon-60@3x.png */, + 7E7966D41810823500FA85AD /* icon-40.png */, + 7E7966D51810823500FA85AD /* icon-40@2x.png */, + 7E7966D61810823500FA85AD /* icon-50.png */, + 7E7966D71810823500FA85AD /* icon-50@2x.png */, + 7E7966D81810823500FA85AD /* icon-60.png */, + 7E7966D91810823500FA85AD /* icon-60@2x.png */, + 7E7966DA1810823500FA85AD /* icon-76.png */, + 7E7966DB1810823500FA85AD /* icon-76@2x.png */, + 7E7966DC1810823500FA85AD /* icon-small.png */, + 7E7966DD1810823500FA85AD /* icon-small@2x.png */, + 30FC414816E50CA1004E6F35 /* icon-72@2x.png */, + 308D052E1370CCF300D202BF /* icon-72.png */, + 308D052F1370CCF300D202BF /* icon.png */, + 308D05301370CCF300D202BF /* icon@2x.png */, + ); + path = icons; + sourceTree = ""; + }; + 308D05311370CCF300D202BF /* splash */ = { + isa = PBXGroup; + children = ( + 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */, + 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */, + 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */, + D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */, + 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */, + 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */, + 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */, + 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */, + 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */, + 3088BBBC154F3926009F9C59 /* Default~iphone.png */, + ); + path = splash; + sourceTree = ""; + }; + EB87FDF11871DA420020F90C /* Staging */ = { + isa = PBXGroup; + children = ( + F840E1F0165FE0F500CFE078 /* config.xml */, + 301BF56E109A69640062928A /* www */, + ); + name = Staging; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 1D6058900D05DD3D006BFB54 /* Stone Island */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Stone Island" */; + buildPhases = ( + 304B58A110DAC018002A0835 /* Copy www directory */, + 1D60588D0D05DD3D006BFB54 /* Resources */, + 1D60588E0D05DD3D006BFB54 /* Sources */, + 1D60588F0D05DD3D006BFB54 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 301BF551109A68C00062928A /* PBXTargetDependency */, + ); + name = Stone Island; + productName = Stone Island; + productReference = 1D6058910D05DD3D006BFB54 /* Stone Island.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 510; + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Stone Island" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + en, + es, + de, + se, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 301BF52E109A57CC0062928A /* Products */; + ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 1D6058900D05DD3D006BFB54 /* Stone Island */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 301BF535109A57CC0062928A /* libCordova.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libCordova.a; + remoteRef = 301BF534109A57CC0062928A /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 1D60588D0D05DD3D006BFB54 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E7966E41810823500FA85AD /* icon-76.png in Resources */, + 7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */, + 308D05371370CCF300D202BF /* icon-72.png in Resources */, + 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */, + 308D05381370CCF300D202BF /* icon.png in Resources */, + 308D05391370CCF300D202BF /* icon@2x.png in Resources */, + 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, + 7E7966E01810823500FA85AD /* icon-50.png in Resources */, + 7E7966E31810823500FA85AD /* icon-60@2x.png in Resources */, + 7E7966E61810823500FA85AD /* icon-small.png in Resources */, + 3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */, + 3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */, + 3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */, + 7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */, + 3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */, + 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */, + 7E7966DE1810823500FA85AD /* icon-40.png in Resources */, + 3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */, + 7E7966E21810823500FA85AD /* icon-60.png in Resources */, + 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */, + D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */, + 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */, + 30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */, + 7E7966E11810823500FA85AD /* icon-50@2x.png in Resources */, + 7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */, + 30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */, + 8C7A214013CE439381D8EFA5 /* CDVNotification.bundle in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 304B58A110DAC018002A0835 /* Copy www directory */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy www directory"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "cordova/lib/copy-www-build-step.sh"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 1D60588E0D05DD3D006BFB54 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 1D60589B0D05DD56006BFB54 /* main.m in Sources */, + 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, + 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, + 7A5729AE550743E8897FEFAC /* IonicKeyboard.m in Sources */, + 884B7DE1CA8D4BF6A05FA8A7 /* UIWebViewExtension.m in Sources */, + 8F9C2C1B292E4E24B625BDCD /* CDVLogger.m in Sources */, + E301F0EFEA0F4AE591CD6383 /* CDVDevice.m in Sources */, + 900CDEE3AC16432C9F7FA9C0 /* CDVNotification.m in Sources */, + ADE60A85B8184E6F9EEBBCFB /* CDVLocation.m in Sources */, + B35136AD62114038A8B7792F /* CDVConnection.m in Sources */, + 28C7BF9E95C74BDBAFE9EDBA /* CDVReachability.m in Sources */, + 3ACFAEAFE74B4E51A4C86ED6 /* CDVSplashScreen.m in Sources */, + 975A6258D55048DB90E5144A /* CDVViewController+SplashScreen.m in Sources */, + F6FB47A99F304BFBA7154086 /* AppDelegate+notification.m in Sources */, + B7B78ADD10614527873A2D16 /* PushPlugin.m in Sources */, + CEFCDB7C540D4365B8629E85 /* SocialSharing.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 301BF551109A68C00062928A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CordovaLib; + targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 1D6058940D05DD3E006BFB54 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Stone Island/Stone Island-Prefix.pch"; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + INFOPLIST_FILE = "Stone Island/Stone Island-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_LDFLAGS = ( + "-weak_framework", + CoreFoundation, + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak-lSystem", + "-ObjC", + ); + PRODUCT_NAME = "Stone Island"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 1D6058950D05DD3E006BFB54 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "Stone Island/Stone Island-Prefix.pch"; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + INFOPLIST_FILE = "Stone Island/Stone Island-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_LDFLAGS = ( + "-weak_framework", + CoreFoundation, + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak-lSystem", + "-ObjC", + ); + PRODUCT_NAME = "Stone Island"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + ONLY_ACTIVE_ARCH = YES; + OTHER_LDFLAGS = ( + "-weak_framework", + CoreFoundation, + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak-lSystem", + "-ObjC", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = NO; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + GCC_C_LANGUAGE_STANDARD = c99; + GCC_THUMB_SUPPORT = NO; + GCC_VERSION = ""; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", + "\"$(OBJROOT)/UninstalledProducts/include\"", + "\"$(BUILT_PRODUCTS_DIR)\"", + ); + IPHONEOS_DEPLOYMENT_TARGET = 6.0; + OTHER_LDFLAGS = ( + "-weak_framework", + CoreFoundation, + "-weak_framework", + UIKit, + "-weak_framework", + AVFoundation, + "-weak_framework", + CoreMedia, + "-weak-lSystem", + "-ObjC", + ); + SDKROOT = iphoneos; + SKIP_INSTALL = NO; + USER_HEADER_SEARCH_PATHS = ""; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "Stone Island" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1D6058940D05DD3E006BFB54 /* Debug */, + 1D6058950D05DD3E006BFB54 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Stone Island" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout new file mode 100644 index 00000000..841af2bf --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 7E1D02F6-0F9E-4C28-9F28-2E37CB639DF0 + IDESourceControlProjectName + StoneIsland + IDESourceControlProjectOriginsDictionary + + 10B248D89F55F057EF759644D7695723C40D8B27 + github.com:okfocus/stone-island.git + + IDESourceControlProjectPath + StoneIsland/platforms/ios/StoneIsland.xcodeproj + IDESourceControlProjectRelativeInstallPathDictionary + + 10B248D89F55F057EF759644D7695723C40D8B27 + ../../../../.. + + IDESourceControlProjectURL + github.com:okfocus/stone-island.git + IDESourceControlProjectVersion + 111 + IDESourceControlProjectWCCIdentifier + 10B248D89F55F057EF759644D7695723C40D8B27 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + 10B248D89F55F057EF759644D7695723C40D8B27 + IDESourceControlWCCName + stone-island + + + + diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..a8bb4a28 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..935dae0b Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/StoneIsland/platforms/ios/Stone Island/.gitignore b/StoneIsland/platforms/ios/Stone Island/.gitignore new file mode 100644 index 00000000..cc76483f --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/.gitignore @@ -0,0 +1,5 @@ +*.mode1v3 +*.perspectivev3 +*.pbxuser +.DS_Store +build/ diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h new file mode 100644 index 00000000..2587ce10 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h @@ -0,0 +1,42 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// AppDelegate.h +// HelloCordova +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import + +#import + +@interface AppDelegate : NSObject {} + +// invoke string is passed to your app on launch, this is only valid if you +// edit HelloCordova-Info.plist to add a protocol +// a simple tutorial can be found here : +// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html + +@property (nonatomic, strong) IBOutlet UIWindow* window; +@property (nonatomic, strong) IBOutlet CDVViewController* viewController; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m new file mode 100644 index 00000000..79e57538 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m @@ -0,0 +1,151 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// AppDelegate.m +// HelloCordova +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import "AppDelegate.h" +#import "MainViewController.h" + +#import + +@implementation AppDelegate + +@synthesize window, viewController; + +- (id)init +{ + /** If you need to do any extra app-specific initialization, you can do it here + * -jm + **/ + NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; + + [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; + + int cacheSizeMemory = 8 * 1024 * 1024; // 8MB + int cacheSizeDisk = 32 * 1024 * 1024; // 32MB +#if __has_feature(objc_arc) + NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"]; +#else + NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease]; +#endif + [NSURLCache setSharedURLCache:sharedCache]; + + self = [super init]; + return self; +} + +#pragma mark UIApplicationDelegate implementation + +/** + * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up) + */ +- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions +{ + CGRect screenBounds = [[UIScreen mainScreen] bounds]; + +#if __has_feature(objc_arc) + self.window = [[UIWindow alloc] initWithFrame:screenBounds]; +#else + self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease]; +#endif + self.window.autoresizesSubviews = YES; + +#if __has_feature(objc_arc) + self.viewController = [[MainViewController alloc] init]; +#else + self.viewController = [[[MainViewController alloc] init] autorelease]; +#endif + + // Set your app's start page by setting the tag in config.xml. + // If necessary, uncomment the line below to override it. + // self.viewController.startPage = @"index.html"; + + // NOTE: To customize the view's frame size (which defaults to full screen), override + // [self.viewController viewWillAppear:] in your view controller. + + self.window.rootViewController = self.viewController; + [self.window makeKeyAndVisible]; + + return YES; +} + +// this happens while we are running ( in the background, or from within our own app ) +// only valid if HelloCordova-Info.plist specifies a protocol to handle +- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation +{ + if (!url) { + return NO; + } + + // all plugins will get the notification, and their handlers will be called + [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; + + return YES; +} + +// repost all remote and local notification using the default NSNotificationCenter so multiple plugins may respond +- (void) application:(UIApplication*)application + didReceiveLocalNotification:(UILocalNotification*)notification +{ + // re-post ( broadcast ) + [[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification]; +} + +#ifndef DISABLE_PUSH_NOTIFICATIONS + + - (void) application:(UIApplication*)application + didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken + { + // re-post ( broadcast ) + NSString* token = [[[[deviceToken description] + stringByReplacingOccurrencesOfString:@"<" withString:@""] + stringByReplacingOccurrencesOfString:@">" withString:@""] + stringByReplacingOccurrencesOfString:@" " withString:@""]; + + [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token]; + } + + - (void) application:(UIApplication*)application + didFailToRegisterForRemoteNotificationsWithError:(NSError*)error + { + // re-post ( broadcast ) + [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error]; + } +#endif + +- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window +{ + // iPhone doesn't support upside down by default, while the iPad does. Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected). + NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown); + + return supportedInterfaceOrientations; +} + +- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application +{ + [[NSURLCache sharedURLCache] removeAllCachedResponses]; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h new file mode 100644 index 00000000..e17e798a --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h @@ -0,0 +1,40 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// MainViewController.h +// HelloCordova +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import +#import +#import + +@interface MainViewController : CDVViewController + +@end + +@interface MainCommandDelegate : CDVCommandDelegateImpl +@end + +@interface MainCommandQueue : CDVCommandQueue +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m new file mode 100644 index 00000000..2fe5fc4b --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m @@ -0,0 +1,164 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +// +// MainViewController.h +// HelloCordova +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import "MainViewController.h" + +@implementation MainViewController + +- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Uncomment to override the CDVCommandDelegateImpl used + // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self]; + // Uncomment to override the CDVCommandQueue used + // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self]; + } + return self; +} + +- (id)init +{ + self = [super init]; + if (self) { + // Uncomment to override the CDVCommandDelegateImpl used + // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self]; + // Uncomment to override the CDVCommandQueue used + // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self]; + } + return self; +} + +- (void)didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +#pragma mark View lifecycle + +- (void)viewWillAppear:(BOOL)animated +{ + // View defaults to full size. If you want to customize the view's size, or its subviews (e.g. webView), + // you can do so here. + + [super viewWillAppear:animated]; +} + +- (void)viewDidLoad +{ + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. +} + +- (void)viewDidUnload +{ + [super viewDidUnload]; + // Release any retained subviews of the main view. + // e.g. self.myOutlet = nil; +} + +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation +{ + // Return YES for supported orientations + return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; +} + +/* Comment out the block below to over-ride */ + +/* +- (UIWebView*) newCordovaViewWithFrame:(CGRect)bounds +{ + return[super newCordovaViewWithFrame:bounds]; +} +*/ + +#pragma mark UIWebDelegate implementation + +- (void)webViewDidFinishLoad:(UIWebView*)theWebView +{ + // Black base color for background matches the native apps + theWebView.backgroundColor = [UIColor blackColor]; + + return [super webViewDidFinishLoad:theWebView]; +} + +/* Comment out the block below to over-ride */ + +/* + +- (void) webViewDidStartLoad:(UIWebView*)theWebView +{ + return [super webViewDidStartLoad:theWebView]; +} + +- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error +{ + return [super webView:theWebView didFailLoadWithError:error]; +} + +- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType +{ + return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType]; +} +*/ + +@end + +@implementation MainCommandDelegate + +/* To override the methods, uncomment the line in the init function(s) + in MainViewController.m + */ + +#pragma mark CDVCommandDelegate implementation + +- (id)getCommandInstance:(NSString*)className +{ + return [super getCommandInstance:className]; +} + +- (NSString*)pathForResource:(NSString*)resourcepath +{ + return [super pathForResource:resourcepath]; +} + +@end + +@implementation MainCommandQueue + +/* To override, uncomment the line in the init function(s) + in MainViewController.m + */ +- (BOOL)execute:(CDVInvokedUrlCommand*)command +{ + return [super execute:command]; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.xib b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.xib new file mode 100644 index 00000000..e45d65c6 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.xib @@ -0,0 +1,138 @@ + + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {{0, 20}, {320, 460}} + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + 1 + + + + + -1 + + + File's Owner + + + -2 + + + + + + + MainViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + MainViewController + UIViewController + + IBProjectSource + ./Classes/MainViewController.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 916 + + diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/README b/StoneIsland/platforms/ios/Stone Island/Plugins/README new file mode 100644 index 00000000..87df09f2 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/README @@ -0,0 +1,20 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.h b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.h new file mode 100644 index 00000000..b54f430d --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.h @@ -0,0 +1,13 @@ +#import + +@interface IonicKeyboard : CDVPlugin { + @protected + id _keyboardShowObserver, _keyboardHideObserver; +} + +@property (readwrite, assign) BOOL hideKeyboardAccessoryBar; +@property (readwrite, assign) BOOL disableScroll; +//@property (readwrite, assign) BOOL styleDark; + +@end + diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.m b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.m new file mode 100644 index 00000000..045cc65f --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/IonicKeyboard.m @@ -0,0 +1,160 @@ +#import "IonicKeyboard.h" +#import "UIWebViewExtension.h" +#import + +@implementation IonicKeyboard + +@synthesize hideKeyboardAccessoryBar = _hideKeyboardAccessoryBar; +@synthesize disableScroll = _disableScroll; +//@synthesize styleDark = _styleDark; + +- (void)pluginInitialize { + + NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; + __weak IonicKeyboard* weakSelf = self; + + //set defaults + self.hideKeyboardAccessoryBar = NO; + self.disableScroll = NO; + //self.styleDark = NO; + + _keyboardShowObserver = [nc addObserverForName:UIKeyboardWillShowNotification + object:nil + queue:[NSOperationQueue mainQueue] + usingBlock:^(NSNotification* notification) { + + CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; + keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil]; + + [weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.plugins.Keyboard.isVisible = true; cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]]; + + //deprecated + [weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]]; + }]; + + _keyboardHideObserver = [nc addObserverForName:UIKeyboardWillHideNotification + object:nil + queue:[NSOperationQueue mainQueue] + usingBlock:^(NSNotification* notification) { + [weakSelf.commandDelegate evalJs:@"cordova.plugins.Keyboard.isVisible = false; cordova.fireWindowEvent('native.keyboardhide'); "]; + + //deprecated + [weakSelf.commandDelegate evalJs:@"cordova.fireWindowEvent('native.hidekeyboard'); "]; + }]; +} +- (BOOL)disableScroll { + return _disableScroll; +} + +- (void)setDisableScroll:(BOOL)disableScroll { + if (disableScroll == _disableScroll) { + return; + } + if (disableScroll) { + self.webView.scrollView.scrollEnabled = NO; + self.webView.scrollView.delegate = self; + } + else { + self.webView.scrollView.scrollEnabled = YES; + self.webView.scrollView.delegate = nil; + } + + _disableScroll = disableScroll; +} + + +- (BOOL)hideKeyboardAccessoryBar { + return _hideKeyboardAccessoryBar; +} + +- (void)setHideKeyboardAccessoryBar:(BOOL)hideKeyboardAccessoryBar { + if (hideKeyboardAccessoryBar == _hideKeyboardAccessoryBar) { + return; + } + if (hideKeyboardAccessoryBar) { + self.webView.hackishlyHidesInputAccessoryView = YES; + } + else { + self.webView.hackishlyHidesInputAccessoryView = NO; + } + + _hideKeyboardAccessoryBar = hideKeyboardAccessoryBar; +} + +/* +- (BOOL)styleDark { + return _styleDark; +} + +- (void)setStyleDark:(BOOL)styleDark { + if (styleDark == _styleDark) { + return; + } + if (styleDark) { + self.webView.styleDark = YES; + } + else { + self.webView.styleDark = NO; + } + + _styleDark = styleDark; +} +*/ + + +/* ------------------------------------------------------------- */ + +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + [scrollView setContentOffset: CGPointZero]; +} + +/* ------------------------------------------------------------- */ + +- (void)dealloc { + NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; + + [nc removeObserver:self name:UIKeyboardWillShowNotification object:nil]; + [nc removeObserver:self name:UIKeyboardWillHideNotification object:nil]; +} + +/* ------------------------------------------------------------- */ + +- (void) disableScroll:(CDVInvokedUrlCommand*)command { + if (!command.arguments || ![command.arguments count]){ + return; + } + id value = [command.arguments objectAtIndex:0]; + + self.disableScroll = [value boolValue]; +} + +- (void) hideKeyboardAccessoryBar:(CDVInvokedUrlCommand*)command { + if (!command.arguments || ![command.arguments count]){ + return; + } + id value = [command.arguments objectAtIndex:0]; + + self.hideKeyboardAccessoryBar = [value boolValue]; +} + +- (void) close:(CDVInvokedUrlCommand*)command { + [self.webView endEditing:YES]; +} + +- (void) show:(CDVInvokedUrlCommand*)command { + NSLog(@"Showing keyboard not supported in iOS due to platform limitations."); +} + +/* +- (void) styleDark:(CDVInvokedUrlCommand*)command { + if (!command.arguments || ![command.arguments count]){ + return; + } + id value = [command.arguments objectAtIndex:0]; + + self.styleDark = [value boolValue]; +} +*/ + +@end + diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.h b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.h new file mode 100644 index 00000000..1d6c293d --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.h @@ -0,0 +1,4 @@ +@interface UIWebView (HackishAccessoryHiding) +@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView; +//@property (nonatomic, assign) BOOL styleDark; +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.m b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.m new file mode 100644 index 00000000..25403e6f --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/com.ionic.keyboard/UIWebViewExtension.m @@ -0,0 +1,109 @@ +#import +#import +#import "UIWebViewExtension.h" + +//Credit: https://gist.github.com/bjhomer/2048571 +//Also: http://stackoverflow.com/a/23398487/1091751 +@implementation UIWebView (HackishAccessoryHiding) + +static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView"; +static Class hackishFixClass = Nil; + +- (UIView *)hackishlyFoundBrowserView { + UIScrollView *scrollView = self.scrollView; + + UIView *browserView = nil; + for (UIView *subview in scrollView.subviews) { + if ([NSStringFromClass([subview class]) hasPrefix:@"UIWebBrowserView"]) { + browserView = subview; + break; + } + } + return browserView; +} + +- (id)methodReturningNil { + return nil; +} + +- (void)ensureHackishSubclassExistsOfBrowserViewClass:(Class)browserViewClass { + if (!hackishFixClass) { + Class newClass = objc_allocateClassPair(browserViewClass, hackishFixClassName, 0); + IMP nilImp = [self methodForSelector:@selector(methodReturningNil)]; + class_addMethod(newClass, @selector(inputAccessoryView), nilImp, "@@:"); + objc_registerClassPair(newClass); + + hackishFixClass = newClass; + } +} + +- (BOOL) hackishlyHidesInputAccessoryView { + UIView *browserView = [self hackishlyFoundBrowserView]; + return [browserView class] == hackishFixClass; +} + +- (void) setHackishlyHidesInputAccessoryView:(BOOL)value { + UIView *browserView = [self hackishlyFoundBrowserView]; + if (browserView == nil) { + return; + } + [self ensureHackishSubclassExistsOfBrowserViewClass:[browserView class]]; + + if (value) { + object_setClass(browserView, hackishFixClass); + } + else { + Class normalClass = objc_getClass("UIWebBrowserView"); + object_setClass(browserView, normalClass); + } + [browserView reloadInputViews]; +} +/* ---------------------------------------------------------------- */ + +/* +- (UIKeyboardAppearance) darkKeyboardAppearanceTemplateMethod { + return UIKeyboardAppearanceDark; +} + +- (UIKeyboardAppearance) lightKeyboardAppearanceTemplateMethod { + return UIKeyboardAppearanceLight; +} + +- (BOOL) styleDark { + UIView *browserView = [self hackishlyFoundBrowserView]; + if (browserView == nil) { + return false; + } + + Method m = class_getInstanceMethod( [self class], @selector( darkKeyboardAppearanceTemplateMethod ) ); + IMP imp = method_getImplementation( m ); + + Method m2 = class_getInstanceMethod( [browserView class], @selector(keyboardAppearance) ); + IMP imp2 = method_getImplementation( m2 ); + + return imp == imp2; +} + +- (void) setStyleDark:(BOOL)styleDark { + UIView *browserView = [self hackishlyFoundBrowserView]; + if (browserView == nil) { + return; + } + + if ( styleDark ) { + Method m = class_getInstanceMethod( [self class], @selector( darkKeyboardAppearanceTemplateMethod ) ); + IMP imp = method_getImplementation( m ); + const char* typeEncoding = method_getTypeEncoding( m ); + class_replaceMethod( [browserView class], @selector(keyboardAppearance), imp, typeEncoding ); + } + else { + Method m = class_getInstanceMethod( [self class], @selector( lightKeyboardAppearanceTemplateMethod ) ); + IMP imp = method_getImplementation( m ); + const char* typeEncoding = method_getTypeEncoding( m ); + class_replaceMethod( [browserView class], @selector(keyboardAppearance), imp, typeEncoding ); + } +} +*/ + +@end + diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.h new file mode 100644 index 00000000..7cfb3063 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.h @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVLogger : CDVPlugin + +- (void)logLevel:(CDVInvokedUrlCommand*)command; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.m new file mode 100644 index 00000000..ccfa3a51 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-console/CDVLogger.m @@ -0,0 +1,38 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVLogger.h" +#import + +@implementation CDVLogger + +/* log a message */ +- (void)logLevel:(CDVInvokedUrlCommand*)command +{ + id level = [command argumentAtIndex:0]; + id message = [command argumentAtIndex:1]; + + if ([level isEqualToString:@"LOG"]) { + NSLog(@"%@", message); + } else { + NSLog(@"%@: %@", level, message); + } +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.h new file mode 100644 index 00000000..a146d882 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.h @@ -0,0 +1,30 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface CDVDevice : CDVPlugin +{} + ++ (NSString*)cordovaVersion; + +- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.m new file mode 100644 index 00000000..5a3f4708 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-device/CDVDevice.m @@ -0,0 +1,99 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#include +#include + +#import +#import "CDVDevice.h" + +@implementation UIDevice (ModelVersion) + +- (NSString*)modelVersion +{ + size_t size; + + sysctlbyname("hw.machine", NULL, &size, NULL, 0); + char* machine = malloc(size); + sysctlbyname("hw.machine", machine, &size, NULL, 0); + NSString* platform = [NSString stringWithUTF8String:machine]; + free(machine); + + return platform; +} + +@end + +@interface CDVDevice () {} +@end + +@implementation CDVDevice + +- (NSString*)uniqueAppInstanceIdentifier:(UIDevice*)device +{ + NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + static NSString* UUID_KEY = @"CDVUUID"; + + NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; + + if (app_uuid == nil) { + CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); + CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); + + app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString]; + [userDefaults setObject:app_uuid forKey:UUID_KEY]; + [userDefaults synchronize]; + + CFRelease(uuidString); + CFRelease(uuidRef); + } + + return app_uuid; +} + +- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command +{ + NSDictionary* deviceProperties = [self deviceProperties]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; + + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (NSDictionary*)deviceProperties +{ + UIDevice* device = [UIDevice currentDevice]; + NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4]; + + [devProps setObject:@"Apple" forKey:@"manufacturer"]; + [devProps setObject:[device modelVersion] forKey:@"model"]; + [devProps setObject:@"iOS" forKey:@"platform"]; + [devProps setObject:[device systemVersion] forKey:@"version"]; + [devProps setObject:[self uniqueAppInstanceIdentifier:device] forKey:@"uuid"]; + [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"]; + + NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps]; + return devReturn; +} + ++ (NSString*)cordovaVersion +{ + return CDV_VERSION; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.h new file mode 100644 index 00000000..9253f6a9 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.h @@ -0,0 +1,37 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import + +@interface CDVNotification : CDVPlugin {} + +- (void)alert:(CDVInvokedUrlCommand*)command; +- (void)confirm:(CDVInvokedUrlCommand*)command; +- (void)prompt:(CDVInvokedUrlCommand*)command; +- (void)beep:(CDVInvokedUrlCommand*)command; + +@end + +@interface CDVAlertView : UIAlertView {} +@property (nonatomic, copy) NSString* callbackId; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.m new file mode 100644 index 00000000..1581ad3c --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-dialogs/CDVNotification.m @@ -0,0 +1,221 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVNotification.h" + +#define DIALOG_TYPE_ALERT @"alert" +#define DIALOG_TYPE_PROMPT @"prompt" + +static void soundCompletionCallback(SystemSoundID ssid, void* data); + +@implementation CDVNotification + +/* + * showDialogWithMessage - Common method to instantiate the alert view for alert, confirm, and prompt notifications. + * Parameters: + * message The alert view message. + * title The alert view title. + * buttons The array of customized strings for the buttons. + * defaultText The input text for the textbox (if textbox exists). + * callbackId The commmand callback id. + * dialogType The type of alert view [alert | prompt]. + */ +- (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:(NSArray*)buttons defaultText:(NSString*)defaultText callbackId:(NSString*)callbackId dialogType:(NSString*)dialogType +{ + + NSUInteger count = [buttons count]; +#ifdef __IPHONE_8_0 + if (NSClassFromString(@"UIAlertController")) { + + UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; + + if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.3) { + + CGRect alertFrame = [UIScreen mainScreen].applicationFrame; + + if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { + // swap the values for the app frame since it is now in landscape + CGFloat temp = alertFrame.size.width; + alertFrame.size.width = alertFrame.size.height; + alertFrame.size.height = temp; + } + + alertController.view.frame = alertFrame; + } + + for (int n = 0; n < count; n++) { + + UIAlertAction* action = [UIAlertAction actionWithTitle:[buttons objectAtIndex:n] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) + { + CDVPluginResult* result; + + if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { + + NSString* value0 = [[alertController.textFields objectAtIndex:0] text]; + NSDictionary* info = @{ + @"buttonIndex":@(n + 1), + @"input1":(value0 ? value0 : [NSNull null]) + }; + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; + + } else { + + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(n + 1)]; + + } + + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + + }]; + [alertController addAction:action]; + + } + + if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { + + [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) { + textField.text = defaultText; + }]; + } + + + + [self.viewController presentViewController:alertController animated:YES completion:nil]; + + } else { +#endif + CDVAlertView* alertView = [[CDVAlertView alloc] + initWithTitle:title + message:message + delegate:self + cancelButtonTitle:nil + otherButtonTitles:nil]; + + alertView.callbackId = callbackId; + + + + for (int n = 0; n < count; n++) { + [alertView addButtonWithTitle:[buttons objectAtIndex:n]]; + } + + if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { + alertView.alertViewStyle = UIAlertViewStylePlainTextInput; + UITextField* textField = [alertView textFieldAtIndex:0]; + textField.text = defaultText; + } + + [alertView show]; +#ifdef __IPHONE_8_0 + } +#endif + +} + +- (void)alert:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* message = [command argumentAtIndex:0]; + NSString* title = [command argumentAtIndex:1]; + NSString* buttons = [command argumentAtIndex:2]; + + [self showDialogWithMessage:message title:title buttons:@[buttons] defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT]; +} + +- (void)confirm:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* message = [command argumentAtIndex:0]; + NSString* title = [command argumentAtIndex:1]; + NSArray* buttons = [command argumentAtIndex:2]; + + [self showDialogWithMessage:message title:title buttons:buttons defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT]; +} + +- (void)prompt:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* message = [command argumentAtIndex:0]; + NSString* title = [command argumentAtIndex:1]; + NSArray* buttons = [command argumentAtIndex:2]; + NSString* defaultText = [command argumentAtIndex:3]; + + [self showDialogWithMessage:message title:title buttons:buttons defaultText:defaultText callbackId:callbackId dialogType:DIALOG_TYPE_PROMPT]; +} + +/** + * Callback invoked when an alert dialog's buttons are clicked. + */ +- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex +{ + CDVAlertView* cdvAlertView = (CDVAlertView*)alertView; + CDVPluginResult* result; + + // Determine what gets returned to JS based on the alert view type. + if (alertView.alertViewStyle == UIAlertViewStyleDefault) { + // For alert and confirm, return button index as int back to JS. + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(buttonIndex + 1)]; + } else { + // For prompt, return button index and input text back to JS. + NSString* value0 = [[alertView textFieldAtIndex:0] text]; + NSDictionary* info = @{ + @"buttonIndex":@(buttonIndex + 1), + @"input1":(value0 ? value0 : [NSNull null]) + }; + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; + } + [self.commandDelegate sendPluginResult:result callbackId:cdvAlertView.callbackId]; +} + +static void playBeep(int count) { + SystemSoundID completeSound; + NSInteger cbDataCount = count; + NSURL* audioPath = [[NSBundle mainBundle] URLForResource:@"CDVNotification.bundle/beep" withExtension:@"wav"]; + #if __has_feature(objc_arc) + AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound); + #else + AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound); + #endif + AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(cbDataCount-1)); + AudioServicesPlaySystemSound(completeSound); +} + +static void soundCompletionCallback(SystemSoundID ssid, void* data) { + int count = (int)data; + AudioServicesRemoveSystemSoundCompletion (ssid); + AudioServicesDisposeSystemSoundID(ssid); + if (count > 0) { + playBeep(count); + } +} + +- (void)beep:(CDVInvokedUrlCommand*)command +{ + NSNumber* count = [command argumentAtIndex:0 withDefault:[NSNumber numberWithInt:1]]; + playBeep([count intValue]); +} + + +@end + +@implementation CDVAlertView + +@synthesize callbackId; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.h new file mode 100644 index 00000000..cce2738f --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.h @@ -0,0 +1,70 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import + +enum CDVLocationStatus { + PERMISSIONDENIED = 1, + POSITIONUNAVAILABLE, + TIMEOUT +}; +typedef NSUInteger CDVLocationStatus; + +// simple object to keep track of location information +@interface CDVLocationData : NSObject { + CDVLocationStatus locationStatus; + NSMutableArray* locationCallbacks; + NSMutableDictionary* watchCallbacks; + CLLocation* locationInfo; +} + +@property (nonatomic, assign) CDVLocationStatus locationStatus; +@property (nonatomic, strong) CLLocation* locationInfo; +@property (nonatomic, strong) NSMutableArray* locationCallbacks; +@property (nonatomic, strong) NSMutableDictionary* watchCallbacks; + +@end + +@interface CDVLocation : CDVPlugin { + @private BOOL __locationStarted; + @private BOOL __highAccuracyEnabled; + CDVLocationData* locationData; +} + +@property (nonatomic, strong) CLLocationManager* locationManager; +@property (nonatomic, strong) CDVLocationData* locationData; + +- (void)getLocation:(CDVInvokedUrlCommand*)command; +- (void)addWatch:(CDVInvokedUrlCommand*)command; +- (void)clearWatch:(CDVInvokedUrlCommand*)command; +- (void)returnLocationInfo:(NSString*)callbackId andKeepCallback:(BOOL)keepCallback; +- (void)returnLocationError:(NSUInteger)errorCode withMessage:(NSString*)message; +- (void)startLocation:(BOOL)enableHighAccuracy; + +- (void)locationManager:(CLLocationManager*)manager + didUpdateToLocation:(CLLocation*)newLocation + fromLocation:(CLLocation*)oldLocation; + +- (void)locationManager:(CLLocationManager*)manager + didFailWithError:(NSError*)error; + +- (BOOL)isLocationServicesEnabled; +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.m new file mode 100644 index 00000000..8b543c8e --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-geolocation/CDVLocation.m @@ -0,0 +1,366 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVLocation.h" + +#pragma mark Constants + +#define kPGLocationErrorDomain @"kPGLocationErrorDomain" +#define kPGLocationDesiredAccuracyKey @"desiredAccuracy" +#define kPGLocationForcePromptKey @"forcePrompt" +#define kPGLocationDistanceFilterKey @"distanceFilter" +#define kPGLocationFrequencyKey @"frequency" + +#pragma mark - +#pragma mark Categories + +@implementation CDVLocationData + +@synthesize locationStatus, locationInfo, locationCallbacks, watchCallbacks; +- (CDVLocationData*)init +{ + self = (CDVLocationData*)[super init]; + if (self) { + self.locationInfo = nil; + self.locationCallbacks = nil; + self.watchCallbacks = nil; + } + return self; +} + +@end + +#pragma mark - +#pragma mark CDVLocation + +@implementation CDVLocation + +@synthesize locationManager, locationData; + +- (void)pluginInitialize +{ + self.locationManager = [[CLLocationManager alloc] init]; + self.locationManager.delegate = self; // Tells the location manager to send updates to this object + __locationStarted = NO; + __highAccuracyEnabled = NO; + self.locationData = nil; +} + +- (BOOL)isAuthorized +{ + BOOL authorizationStatusClassPropertyAvailable = [CLLocationManager respondsToSelector:@selector(authorizationStatus)]; // iOS 4.2+ + + if (authorizationStatusClassPropertyAvailable) { + NSUInteger authStatus = [CLLocationManager authorizationStatus]; +#ifdef __IPHONE_8_0 + if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { //iOS 8.0+ + return (authStatus == kCLAuthorizationStatusAuthorizedWhenInUse) || (authStatus == kCLAuthorizationStatusAuthorizedAlways) || (authStatus == kCLAuthorizationStatusNotDetermined); + } +#endif + return (authStatus == kCLAuthorizationStatusAuthorized) || (authStatus == kCLAuthorizationStatusNotDetermined); + } + + // by default, assume YES (for iOS < 4.2) + return YES; +} + +- (BOOL)isLocationServicesEnabled +{ + BOOL locationServicesEnabledInstancePropertyAvailable = [self.locationManager respondsToSelector:@selector(locationServicesEnabled)]; // iOS 3.x + BOOL locationServicesEnabledClassPropertyAvailable = [CLLocationManager respondsToSelector:@selector(locationServicesEnabled)]; // iOS 4.x + + if (locationServicesEnabledClassPropertyAvailable) { // iOS 4.x + return [CLLocationManager locationServicesEnabled]; + } else if (locationServicesEnabledInstancePropertyAvailable) { // iOS 2.x, iOS 3.x + return [(id)self.locationManager locationServicesEnabled]; + } else { + return NO; + } +} + +- (void)startLocation:(BOOL)enableHighAccuracy +{ + if (![self isLocationServicesEnabled]) { + [self returnLocationError:PERMISSIONDENIED withMessage:@"Location services are not enabled."]; + return; + } + if (![self isAuthorized]) { + NSString* message = nil; + BOOL authStatusAvailable = [CLLocationManager respondsToSelector:@selector(authorizationStatus)]; // iOS 4.2+ + if (authStatusAvailable) { + NSUInteger code = [CLLocationManager authorizationStatus]; + if (code == kCLAuthorizationStatusNotDetermined) { + // could return POSITION_UNAVAILABLE but need to coordinate with other platforms + message = @"User undecided on application's use of location services."; + } else if (code == kCLAuthorizationStatusRestricted) { + message = @"Application's use of location services is restricted."; + } + } + // PERMISSIONDENIED is only PositionError that makes sense when authorization denied + [self returnLocationError:PERMISSIONDENIED withMessage:message]; + + return; + } + +#ifdef __IPHONE_8_0 + NSUInteger code = [CLLocationManager authorizationStatus]; + if (code == kCLAuthorizationStatusNotDetermined && ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)] || [self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)])) { //iOS8+ + __highAccuracyEnabled = enableHighAccuracy; + if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]){ + [self.locationManager requestAlwaysAuthorization]; + } else if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]) { + [self.locationManager requestWhenInUseAuthorization]; + } else { + NSLog(@"[Warning] No NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription key is defined in the Info.plist file."); + } + return; + } +#endif + + // Tell the location manager to start notifying us of location updates. We + // first stop, and then start the updating to ensure we get at least one + // update, even if our location did not change. + [self.locationManager stopUpdatingLocation]; + [self.locationManager startUpdatingLocation]; + __locationStarted = YES; + if (enableHighAccuracy) { + __highAccuracyEnabled = YES; + // Set distance filter to 5 for a high accuracy. Setting it to "kCLDistanceFilterNone" could provide a + // higher accuracy, but it's also just spamming the callback with useless reports which drain the battery. + self.locationManager.distanceFilter = 5; + // Set desired accuracy to Best. + self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; + } else { + __highAccuracyEnabled = NO; + // TODO: Set distance filter to 10 meters? and desired accuracy to nearest ten meters? arbitrary. + self.locationManager.distanceFilter = 10; + self.locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; + } +} + +- (void)_stopLocation +{ + if (__locationStarted) { + if (![self isLocationServicesEnabled]) { + return; + } + + [self.locationManager stopUpdatingLocation]; + __locationStarted = NO; + __highAccuracyEnabled = NO; + } +} + +- (void)locationManager:(CLLocationManager*)manager + didUpdateToLocation:(CLLocation*)newLocation + fromLocation:(CLLocation*)oldLocation +{ + CDVLocationData* cData = self.locationData; + + cData.locationInfo = newLocation; + if (self.locationData.locationCallbacks.count > 0) { + for (NSString* callbackId in self.locationData.locationCallbacks) { + [self returnLocationInfo:callbackId andKeepCallback:NO]; + } + + [self.locationData.locationCallbacks removeAllObjects]; + } + if (self.locationData.watchCallbacks.count > 0) { + for (NSString* timerId in self.locationData.watchCallbacks) { + [self returnLocationInfo:[self.locationData.watchCallbacks objectForKey:timerId] andKeepCallback:YES]; + } + } else { + // No callbacks waiting on us anymore, turn off listening. + [self _stopLocation]; + } +} + +- (void)getLocation:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + BOOL enableHighAccuracy = [[command argumentAtIndex:0] boolValue]; + + if ([self isLocationServicesEnabled] == NO) { + NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2]; + [posError setObject:[NSNumber numberWithInt:PERMISSIONDENIED] forKey:@"code"]; + [posError setObject:@"Location services are disabled." forKey:@"message"]; + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]; + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } else { + if (!self.locationData) { + self.locationData = [[CDVLocationData alloc] init]; + } + CDVLocationData* lData = self.locationData; + if (!lData.locationCallbacks) { + lData.locationCallbacks = [NSMutableArray arrayWithCapacity:1]; + } + + if (!__locationStarted || (__highAccuracyEnabled != enableHighAccuracy)) { + // add the callbackId into the array so we can call back when get data + if (callbackId != nil) { + [lData.locationCallbacks addObject:callbackId]; + } + // Tell the location manager to start notifying us of heading updates + [self startLocation:enableHighAccuracy]; + } else { + [self returnLocationInfo:callbackId andKeepCallback:NO]; + } + } +} + +- (void)addWatch:(CDVInvokedUrlCommand*)command +{ + NSString* callbackId = command.callbackId; + NSString* timerId = [command argumentAtIndex:0]; + BOOL enableHighAccuracy = [[command argumentAtIndex:1] boolValue]; + + if (!self.locationData) { + self.locationData = [[CDVLocationData alloc] init]; + } + CDVLocationData* lData = self.locationData; + + if (!lData.watchCallbacks) { + lData.watchCallbacks = [NSMutableDictionary dictionaryWithCapacity:1]; + } + + // add the callbackId into the dictionary so we can call back whenever get data + [lData.watchCallbacks setObject:callbackId forKey:timerId]; + + if ([self isLocationServicesEnabled] == NO) { + NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2]; + [posError setObject:[NSNumber numberWithInt:PERMISSIONDENIED] forKey:@"code"]; + [posError setObject:@"Location services are disabled." forKey:@"message"]; + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]; + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } else { + if (!__locationStarted || (__highAccuracyEnabled != enableHighAccuracy)) { + // Tell the location manager to start notifying us of location updates + [self startLocation:enableHighAccuracy]; + } + } +} + +- (void)clearWatch:(CDVInvokedUrlCommand*)command +{ + NSString* timerId = [command argumentAtIndex:0]; + + if (self.locationData && self.locationData.watchCallbacks && [self.locationData.watchCallbacks objectForKey:timerId]) { + [self.locationData.watchCallbacks removeObjectForKey:timerId]; + if([self.locationData.watchCallbacks count] == 0) { + [self _stopLocation]; + } + } +} + +- (void)stopLocation:(CDVInvokedUrlCommand*)command +{ + [self _stopLocation]; +} + +- (void)returnLocationInfo:(NSString*)callbackId andKeepCallback:(BOOL)keepCallback +{ + CDVPluginResult* result = nil; + CDVLocationData* lData = self.locationData; + + if (lData && !lData.locationInfo) { + // return error + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:POSITIONUNAVAILABLE]; + } else if (lData && lData.locationInfo) { + CLLocation* lInfo = lData.locationInfo; + NSMutableDictionary* returnInfo = [NSMutableDictionary dictionaryWithCapacity:8]; + NSNumber* timestamp = [NSNumber numberWithDouble:([lInfo.timestamp timeIntervalSince1970] * 1000)]; + [returnInfo setObject:timestamp forKey:@"timestamp"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.speed] forKey:@"velocity"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.verticalAccuracy] forKey:@"altitudeAccuracy"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.horizontalAccuracy] forKey:@"accuracy"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.course] forKey:@"heading"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.altitude] forKey:@"altitude"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.coordinate.latitude] forKey:@"latitude"]; + [returnInfo setObject:[NSNumber numberWithDouble:lInfo.coordinate.longitude] forKey:@"longitude"]; + + result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnInfo]; + [result setKeepCallbackAsBool:keepCallback]; + } + if (result) { + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } +} + +- (void)returnLocationError:(NSUInteger)errorCode withMessage:(NSString*)message +{ + NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2]; + + [posError setObject:[NSNumber numberWithUnsignedInteger:errorCode] forKey:@"code"]; + [posError setObject:message ? message:@"" forKey:@"message"]; + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]; + + for (NSString* callbackId in self.locationData.locationCallbacks) { + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } + + [self.locationData.locationCallbacks removeAllObjects]; + + for (NSString* callbackId in self.locationData.watchCallbacks) { + [self.commandDelegate sendPluginResult:result callbackId:callbackId]; + } +} + +- (void)locationManager:(CLLocationManager*)manager didFailWithError:(NSError*)error +{ + NSLog(@"locationManager::didFailWithError %@", [error localizedFailureReason]); + + CDVLocationData* lData = self.locationData; + if (lData && __locationStarted) { + // TODO: probably have to once over the various error codes and return one of: + // PositionError.PERMISSION_DENIED = 1; + // PositionError.POSITION_UNAVAILABLE = 2; + // PositionError.TIMEOUT = 3; + NSUInteger positionError = POSITIONUNAVAILABLE; + if (error.code == kCLErrorDenied) { + positionError = PERMISSIONDENIED; + } + [self returnLocationError:positionError withMessage:[error localizedDescription]]; + } + + if (error.code != kCLErrorLocationUnknown) { + [self.locationManager stopUpdatingLocation]; + __locationStarted = NO; + } +} + +//iOS8+ +-(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status +{ + if(!__locationStarted){ + [self startLocation:__highAccuracyEnabled]; + } +} + +- (void)dealloc +{ + self.locationManager.delegate = nil; +} + +- (void)onReset +{ + [self _stopLocation]; + [self.locationManager stopUpdatingHeading]; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.h new file mode 100644 index 00000000..8add0279 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.h @@ -0,0 +1,34 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import "CDVReachability.h" + +@interface CDVConnection : CDVPlugin { + NSString* type; + NSString* _callbackId; + + CDVReachability* internetReach; +} + +@property (copy) NSString* connectionType; +@property (strong) CDVReachability* internetReach; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.m new file mode 100644 index 00000000..37497675 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVConnection.m @@ -0,0 +1,127 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVConnection.h" +#import "CDVReachability.h" + +@interface CDVConnection (PrivateMethods) +- (void)updateOnlineStatus; +- (void)sendPluginResult; +@end + +@implementation CDVConnection + +@synthesize connectionType, internetReach; + +- (void)getConnectionInfo:(CDVInvokedUrlCommand*)command +{ + _callbackId = command.callbackId; + [self sendPluginResult]; +} + +- (void)sendPluginResult +{ + CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.connectionType]; + + [result setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:result callbackId:_callbackId]; +} + +- (NSString*)w3cConnectionTypeFor:(CDVReachability*)reachability +{ + NetworkStatus networkStatus = [reachability currentReachabilityStatus]; + + switch (networkStatus) { + case NotReachable: + return @"none"; + + case ReachableViaWWAN: + { + BOOL isConnectionRequired = [reachability connectionRequired]; + if (isConnectionRequired) { + return @"none"; + } else { + return @"cellular"; + } + } + case ReachableViaWiFi: + return @"wifi"; + + default: + return @"unknown"; + } +} + +- (BOOL)isCellularConnection:(NSString*)theConnectionType +{ + return [theConnectionType isEqualToString:@"2g"] || + [theConnectionType isEqualToString:@"3g"] || + [theConnectionType isEqualToString:@"4g"] || + [theConnectionType isEqualToString:@"cellular"]; +} + +- (void)updateReachability:(CDVReachability*)reachability +{ + if (reachability) { + // check whether the connection type has changed + NSString* newConnectionType = [self w3cConnectionTypeFor:reachability]; + if ([newConnectionType isEqualToString:self.connectionType]) { // the same as before, remove dupes + return; + } else { + self.connectionType = [self w3cConnectionTypeFor:reachability]; + } + } + [self sendPluginResult]; +} + +- (void)updateConnectionType:(NSNotification*)note +{ + CDVReachability* curReach = [note object]; + + if ((curReach != nil) && [curReach isKindOfClass:[CDVReachability class]]) { + [self updateReachability:curReach]; + } +} + +- (void)onPause +{ + [self.internetReach stopNotifier]; +} + +- (void)onResume +{ + [self.internetReach startNotifier]; + [self updateReachability:self.internetReach]; +} + +- (void)pluginInitialize +{ + self.connectionType = @"none"; + self.internetReach = [CDVReachability reachabilityForInternetConnection]; + self.connectionType = [self w3cConnectionTypeFor:self.internetReach]; + [self.internetReach startNotifier]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:) + name:kReachabilityChangedNotification object:nil]; + if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil]; + } +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.h new file mode 100644 index 00000000..01a95c35 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.h @@ -0,0 +1,85 @@ +/* + + File: Reachability.h + Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs. + Version: 2.2 + + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. + ("Apple") in consideration of your agreement to the following terms, and your + use, installation, modification or redistribution of this Apple software + constitutes acceptance of these terms. If you do not agree with these terms, + please do not use, install, modify or redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and subject + to these terms, Apple grants you a personal, non-exclusive license, under + Apple's copyrights in this original Apple software (the "Apple Software"), to + use, reproduce, modify and redistribute the Apple Software, with or without + modifications, in source and/or binary forms; provided that if you redistribute + the Apple Software in its entirety and without modifications, you must retain + this notice and the following text and disclaimers in all such redistributions + of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may be used + to endorse or promote products derived from the Apple Software without specific + prior written permission from Apple. Except as expressly stated in this notice, + no other rights or licenses, express or implied, are granted by Apple herein, + including but not limited to any patent rights that may be infringed by your + derivative works or by other works in which the Apple Software may be + incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN + COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR + DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF + CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF + APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Copyright (C) 2010 Apple Inc. All Rights Reserved. + +*/ + +#import +#import +#import + +typedef enum { + NotReachable = 0, + ReachableViaWWAN, // this value has been swapped with ReachableViaWiFi for Cordova backwards compat. reasons + ReachableViaWiFi // this value has been swapped with ReachableViaWWAN for Cordova backwards compat. reasons +} NetworkStatus; +#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification" + +@interface CDVReachability : NSObject +{ + BOOL localWiFiRef; + SCNetworkReachabilityRef reachabilityRef; +} + +// reachabilityWithHostName- Use to check the reachability of a particular host name. ++ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName; + +// reachabilityWithAddress- Use to check the reachability of a particular IP address. ++ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; + +// reachabilityForInternetConnection- checks whether the default route is available. +// Should be used by applications that do not connect to a particular host ++ (CDVReachability*)reachabilityForInternetConnection; + +// reachabilityForLocalWiFi- checks whether a local wifi connection is available. ++ (CDVReachability*)reachabilityForLocalWiFi; + +// Start listening for reachability notifications on the current run loop +- (BOOL)startNotifier; +- (void)stopNotifier; + +- (NetworkStatus)currentReachabilityStatus; +// WWAN may be available, but not active until a connection has been established. +// WiFi may require a connection for VPN on Demand. +- (BOOL)connectionRequired; +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.m new file mode 100644 index 00000000..c60261ae --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-network-information/CDVReachability.m @@ -0,0 +1,260 @@ +/* + + File: Reachability.m + Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs. + Version: 2.2 + + Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. + ("Apple") in consideration of your agreement to the following terms, and your + use, installation, modification or redistribution of this Apple software + constitutes acceptance of these terms. If you do not agree with these terms, + please do not use, install, modify or redistribute this Apple software. + + In consideration of your agreement to abide by the following terms, and subject + to these terms, Apple grants you a personal, non-exclusive license, under + Apple's copyrights in this original Apple software (the "Apple Software"), to + use, reproduce, modify and redistribute the Apple Software, with or without + modifications, in source and/or binary forms; provided that if you redistribute + the Apple Software in its entirety and without modifications, you must retain + this notice and the following text and disclaimers in all such redistributions + of the Apple Software. + Neither the name, trademarks, service marks or logos of Apple Inc. may be used + to endorse or promote products derived from the Apple Software without specific + prior written permission from Apple. Except as expressly stated in this notice, + no other rights or licenses, express or implied, are granted by Apple herein, + including but not limited to any patent rights that may be infringed by your + derivative works or by other works in which the Apple Software may be + incorporated. + + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO + WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED + WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN + COMBINATION WITH YOUR PRODUCTS. + + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE + GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR + DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF + CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF + APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Copyright (C) 2010 Apple Inc. All Rights Reserved. + +*/ + +#import +#import +#import +#import +#import +#import + +#import + +#import "CDVReachability.h" + +#define kShouldPrintReachabilityFlags 0 + +static void CDVPrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment) +{ +#if kShouldPrintReachabilityFlags + NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n", + (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', + (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', + + (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', + (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', + (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', + (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', + (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', + comment + ); +#endif +} + +@implementation CDVReachability + +static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) +{ +#pragma unused (target, flags) + // NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); + // NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); + + // Converted the asserts above to conditionals, with safe return from the function + if (info == NULL) { + NSLog(@"info was NULL in ReachabilityCallback"); + return; + } + + if (![(__bridge NSObject*)info isKindOfClass :[CDVReachability class]]) { + NSLog(@"info was wrong class in ReachabilityCallback"); + return; + } + + // We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively + // in case someon uses the Reachability object in a different thread. + @autoreleasepool { + CDVReachability* noteObject = (__bridge CDVReachability*)info; + // Post a notification to notify the client that the network reachability changed. + [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification object:noteObject]; + } +} + +- (BOOL)startNotifier +{ + BOOL retVal = NO; + SCNetworkReachabilityContext context = {0, (__bridge void*)(self), NULL, NULL, NULL}; + + if (SCNetworkReachabilitySetCallback(reachabilityRef, CDVReachabilityCallback, &context)) { + if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) { + retVal = YES; + } + } + return retVal; +} + +- (void)stopNotifier +{ + if (reachabilityRef != NULL) { + SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); + } +} + +- (void)dealloc +{ + [self stopNotifier]; + if (reachabilityRef != NULL) { + CFRelease(reachabilityRef); + } +} + ++ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName; +{ + CDVReachability* retVal = NULL; + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); + if (reachability != NULL) { + retVal = [[self alloc] init]; + if (retVal != NULL) { + retVal->reachabilityRef = reachability; + retVal->localWiFiRef = NO; + } + } + return retVal; +} + ++ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; +{ + SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress); + CDVReachability* retVal = NULL; + if (reachability != NULL) { + retVal = [[self alloc] init]; + if (retVal != NULL) { + retVal->reachabilityRef = reachability; + retVal->localWiFiRef = NO; + } + } + return retVal; +} + ++ (CDVReachability*)reachabilityForInternetConnection; +{ + struct sockaddr_in zeroAddress; + bzero(&zeroAddress, sizeof(zeroAddress)); + zeroAddress.sin_len = sizeof(zeroAddress); + zeroAddress.sin_family = AF_INET; + return [self reachabilityWithAddress:&zeroAddress]; +} + ++ (CDVReachability*)reachabilityForLocalWiFi; +{ + struct sockaddr_in localWifiAddress; + bzero(&localWifiAddress, sizeof(localWifiAddress)); + localWifiAddress.sin_len = sizeof(localWifiAddress); + localWifiAddress.sin_family = AF_INET; + // IN_LINKLOCALNETNUM is defined in as 169.254.0.0 + localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); + CDVReachability* retVal = [self reachabilityWithAddress:&localWifiAddress]; + if (retVal != NULL) { + retVal->localWiFiRef = YES; + } + return retVal; +} + +#pragma mark Network Flag Handling + +- (NetworkStatus)localWiFiStatusForFlags:(SCNetworkReachabilityFlags)flags +{ + CDVPrintReachabilityFlags(flags, "localWiFiStatusForFlags"); + + BOOL retVal = NotReachable; + if ((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect)) { + retVal = ReachableViaWiFi; + } + return retVal; +} + +- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags +{ + CDVPrintReachabilityFlags(flags, "networkStatusForFlags"); + if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) { + // if target host is not reachable + return NotReachable; + } + + NetworkStatus retVal = NotReachable; + + if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) { + // if target host is reachable and no connection is required + // then we'll assume (for now) that your on Wi-Fi + retVal = ReachableViaWiFi; + } + + if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand) != 0) || + ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))) { + // ... and the connection is on-demand (or on-traffic) if the + // calling application is using the CFSocketStream or higher APIs + + if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) { + // ... and no [user] intervention is needed + retVal = ReachableViaWiFi; + } + } + + if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) { + // ... but WWAN connections are OK if the calling application + // is using the CFNetwork (CFSocketStream?) APIs. + retVal = ReachableViaWWAN; + } + return retVal; +} + +- (BOOL)connectionRequired; +{ + NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef"); + SCNetworkReachabilityFlags flags; + if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { + return flags & kSCNetworkReachabilityFlagsConnectionRequired; + } + return NO; +} + +- (NetworkStatus)currentReachabilityStatus +{ + NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef"); + NetworkStatus retVal = NotReachable; + SCNetworkReachabilityFlags flags; + if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { + if (localWiFiRef) { + retVal = [self localWiFiStatusForFlags:flags]; + } else { + retVal = [self networkStatusForFlags:flags]; + } + } + return retVal; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h new file mode 100644 index 00000000..0d6ae397 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h @@ -0,0 +1,43 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +typedef struct { + BOOL iPhone; + BOOL iPad; + BOOL iPhone5; + BOOL iPhone6; + BOOL iPhone6Plus; + BOOL retina; + +} CDV_iOSDevice; + +@interface CDVSplashScreen : CDVPlugin { + UIActivityIndicatorView* _activityView; + UIImageView* _imageView; + NSString* _curImageName; + BOOL _visible; +} + +- (void)show:(CDVInvokedUrlCommand*)command; +- (void)hide:(CDVInvokedUrlCommand*)command; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m new file mode 100644 index 00000000..43b356ad --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m @@ -0,0 +1,330 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVSplashScreen.h" +#import +#import +#import "CDVViewController+SplashScreen.h" + +#define kSplashScreenDurationDefault 0.25f + + +@implementation CDVSplashScreen + +- (void)pluginInitialize +{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad) name:CDVPageDidLoadNotification object:self.webView]; + + [self setVisible:YES]; +} + +- (void)show:(CDVInvokedUrlCommand*)command +{ + [self setVisible:YES]; +} + +- (void)hide:(CDVInvokedUrlCommand*)command +{ + [self setVisible:NO]; +} + +- (void)pageDidLoad +{ + id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]]; + + // if value is missing, default to yes + if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) { + [self setVisible:NO]; + } +} + +- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context +{ + [self updateImage]; +} + +- (void)createViews +{ + /* + * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style. + * + * whiteLarge = UIActivityIndicatorViewStyleWhiteLarge + * white = UIActivityIndicatorViewStyleWhite + * gray = UIActivityIndicatorViewStyleGray + * + */ + + // Determine whether rotation should be enabled for this device + // Per iOS HIG, landscape is only supported on iPad and iPhone 6+ + CDV_iOSDevice device = [self getCurrentDevice]; + BOOL autorotateValue = (device.iPad || device.iPhone6Plus) ? + [(CDVViewController *)self.viewController shouldAutorotateDefaultValue] : + NO; + + [(CDVViewController *)self.viewController setEnabledAutorotation:autorotateValue]; + + NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]]; + UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; + + if ([topActivityIndicator isEqualToString:@"whiteLarge"]) { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge; + } else if ([topActivityIndicator isEqualToString:@"white"]) { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite; + } else if ([topActivityIndicator isEqualToString:@"gray"]) { + topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; + } + + UIView* parentView = self.viewController.view; + parentView.userInteractionEnabled = NO; // disable user interaction while splashscreen is shown + _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle]; + _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2); + _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin + | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin; + [_activityView startAnimating]; + + // Set the frame & image later. + _imageView = [[UIImageView alloc] init]; + [parentView addSubview:_imageView]; + + id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:[@"ShowSplashScreenSpinner" lowercaseString]]; + // backwards compatibility - if key is missing, default to true + if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue]) { + [parentView addSubview:_activityView]; + } + + // Frame is required when launching in portrait mode. + // Bounds for landscape since it captures the rotation. + [parentView addObserver:self forKeyPath:@"frame" options:0 context:nil]; + [parentView addObserver:self forKeyPath:@"bounds" options:0 context:nil]; + + [self updateImage]; +} + +- (void)destroyViews +{ + [(CDVViewController *)self.viewController setEnabledAutorotation:[(CDVViewController *)self.viewController shouldAutorotateDefaultValue]]; + + [_imageView removeFromSuperview]; + [_activityView removeFromSuperview]; + _imageView = nil; + _activityView = nil; + _curImageName = nil; + + self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion + [self.viewController.view removeObserver:self forKeyPath:@"frame"]; + [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; +} + +- (CDV_iOSDevice) getCurrentDevice +{ + CDV_iOSDevice device; + + UIScreen* mainScreen = [UIScreen mainScreen]; + CGFloat mainScreenHeight = mainScreen.bounds.size.height; + CGFloat mainScreenWidth = mainScreen.bounds.size.width; + + int limit = MAX(mainScreenHeight,mainScreenWidth); + + device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); + device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); + device.retina = ([mainScreen scale] == 2.0); + device.iPhone5 = (device.iPhone && limit == 568.0); + // note these below is not a true device detect, for example if you are on an + // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but + // this is appropriate for detecting the runtime screen environment + device.iPhone6 = (device.iPhone && limit == 667.0); + device.iPhone6Plus = (device.iPhone && limit == 736.0); + + return device; +} + +- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device +{ + // Use UILaunchImageFile if specified in plist. Otherwise, use Default. + NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; + + NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; + + // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape + BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); + BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); + // this means there are no mixed orientations in there + BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); + + if (imageName) { + imageName = [imageName stringByDeletingPathExtension]; + } else { + imageName = @"Default"; + } + + if (device.iPhone5) { // does not support landscape + imageName = [imageName stringByAppendingString:@"-568h"]; + } else if (device.iPhone6) { // does not support landscape + imageName = [imageName stringByAppendingString:@"-667h"]; + } else if (device.iPhone6Plus) { // supports landscape + if (isOrientationLocked) { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")]; + } else { + switch (currentOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + default: + break; + } + } + imageName = [imageName stringByAppendingString:@"-736h"]; + + } else if (device.iPad) { // supports landscape + if (isOrientationLocked) { + imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; + } else { + switch (currentOrientation) { + case UIInterfaceOrientationLandscapeLeft: + case UIInterfaceOrientationLandscapeRight: + imageName = [imageName stringByAppendingString:@"-Landscape"]; + break; + + case UIInterfaceOrientationPortrait: + case UIInterfaceOrientationPortraitUpsideDown: + default: + imageName = [imageName stringByAppendingString:@"-Portrait"]; + break; + } + } + } + + return imageName; +} + +// Sets the view's frame and image. +- (void)updateImage +{ + NSString* imageName = [self getImageName:[[UIApplication sharedApplication] statusBarOrientation] delegate:(id)self.viewController device:[self getCurrentDevice]]; + + if (![imageName isEqualToString:_curImageName]) { + UIImage* img = [UIImage imageNamed:imageName]; + _imageView.image = img; + _curImageName = imageName; + } + + // Check that splash screen's image exists before updating bounds + if (_imageView.image) { + [self updateBounds]; + } else { + NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName); + } +} + +- (void)updateBounds +{ + UIImage* img = _imageView.image; + CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero; + + CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size; + UIInterfaceOrientation orientation = self.viewController.interfaceOrientation; + CGAffineTransform imgTransform = CGAffineTransformIdentity; + + /* If and only if an iPhone application is landscape-only as per + * UISupportedInterfaceOrientations, the view controller's orientation is + * landscape. In this case the image must be rotated in order to appear + * correctly. + */ + BOOL isIPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad; + if (UIInterfaceOrientationIsLandscape(orientation) && !isIPad) { + imgTransform = CGAffineTransformMakeRotation(M_PI / 2); + imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width); + } + + // There's a special case when the image is the size of the screen. + if (CGSizeEqualToSize(screenSize, imgBounds.size)) { + CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil]; + if (!(IsAtLeastiOSVersion(@"7.0"))) { + imgBounds.origin.y -= statusFrame.size.height; + } + } else if (imgBounds.size.width > 0) { + CGRect viewBounds = self.viewController.view.bounds; + CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height; + CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height; + // This matches the behaviour of the native splash screen. + CGFloat ratio; + if (viewAspect > imgAspect) { + ratio = viewBounds.size.width / imgBounds.size.width; + } else { + ratio = viewBounds.size.height / imgBounds.size.height; + } + imgBounds.size.height *= ratio; + imgBounds.size.width *= ratio; + } + + _imageView.transform = imgTransform; + _imageView.frame = imgBounds; +} + +- (void)setVisible:(BOOL)visible +{ + if (visible == _visible) { + return; + } + _visible = visible; + + id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]]; + id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]]; + + float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault : [fadeSplashScreenDuration floatValue]; + + if ((fadeSplashScreenValue == nil) || ![fadeSplashScreenValue boolValue]) { + fadeDuration = 0; + } + + // Never animate the showing of the splash screen. + if (visible) { + if (_imageView == nil) { + [self createViews]; + } + } else if (fadeDuration == 0) { + [self destroyViews]; + } else { + __weak __typeof(self) weakSelf = self; + + [UIView transitionWithView:self.viewController.view + duration:fadeDuration + options:UIViewAnimationOptionTransitionNone + animations:^(void) { + __typeof(self) strongSelf = weakSelf; + if (strongSelf != nil) { + dispatch_async(dispatch_get_main_queue(), ^{ + [strongSelf->_activityView setAlpha:0]; + [strongSelf->_imageView setAlpha:0]; + }); + } + } + completion:^(BOOL finished) { + if (finished) { + dispatch_async(dispatch_get_main_queue(), ^{ + [weakSelf destroyViews]; + }); + } + } + ]; + } +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h new file mode 100644 index 00000000..a948ea31 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVViewController (SplashScreen) + +@property (nonatomic, assign) BOOL enabledAutorotation; +@property (nonatomic, readonly) BOOL shouldAutorotateDefaultValue; + + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m new file mode 100644 index 00000000..5736b6f2 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m @@ -0,0 +1,82 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVViewController+SplashScreen.h" +#import + +@implementation CDVViewController (SplashScreen) + +@dynamic enabledAutorotation; + +- (void)setEnabledAutorotation:(BOOL)value +{ + objc_setAssociatedObject(self, + @selector(enabledAutorotation), + [NSNumber numberWithBool:value], + OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (BOOL)enabledAutorotation +{ + NSNumber *number = (NSNumber *)objc_getAssociatedObject(self, @selector(enabledAutorotation)); + return [number boolValue]; +} + ++ (void)load +{ + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + Class class = [self class]; + + SEL originalSelector = @selector(shouldAutorotate); + SEL swizzledSelector = @selector(splash_shouldAutorotate); + + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); + + BOOL didAddMethod = class_addMethod(class, + originalSelector, + method_getImplementation(swizzledMethod), + method_getTypeEncoding(swizzledMethod)); + + if (didAddMethod) { + class_replaceMethod(class, + swizzledSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, swizzledMethod); + } + }); +} + +#pragma mark - Method Swizzling + +- (BOOL)splash_shouldAutorotate +{ + return self.enabledAutorotation; +} + + +- (BOOL)shouldAutorotateDefaultValue +{ + return [self splash_shouldAutorotate]; +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h new file mode 100755 index 00000000..b51474d3 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h @@ -0,0 +1,27 @@ +#import +#import + +@interface SocialSharing : CDVPlugin + +@property (nonatomic, strong) MFMailComposeViewController *globalMailComposer; +@property (retain) UIDocumentInteractionController * documentInteractionController; +@property (retain) NSString * tempStoredFile; +@property (retain) CDVInvokedUrlCommand * command; + +- (void)available:(CDVInvokedUrlCommand*)command; +- (void)setIPadPopupCoordinates:(CDVInvokedUrlCommand*)command; +- (void)share:(CDVInvokedUrlCommand*)command; +- (void)canShareVia:(CDVInvokedUrlCommand*)command; +- (void)canShareViaEmail:(CDVInvokedUrlCommand*)command; +- (void)shareVia:(CDVInvokedUrlCommand*)command; +- (void)shareViaTwitter:(CDVInvokedUrlCommand*)command; +- (void)shareViaFacebook:(CDVInvokedUrlCommand*)command; +- (void)shareViaFacebookWithPasteMessageHint:(CDVInvokedUrlCommand*)command; +- (void)shareViaWhatsApp:(CDVInvokedUrlCommand*)command; +- (void)shareViaSMS:(CDVInvokedUrlCommand*)command; +- (void)shareViaEmail:(CDVInvokedUrlCommand*)command; +- (void)shareViaInstagram:(CDVInvokedUrlCommand*)command; + +- (void)saveToPhotoAlbum:(CDVInvokedUrlCommand*)command; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m new file mode 100755 index 00000000..cd0913a4 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m @@ -0,0 +1,715 @@ +#import "SocialSharing.h" +#import +#import +#import +#import +#import +#import + +@implementation SocialSharing { + UIPopoverController *_popover; + NSString *_popupCoordinates; +} + +- (void)pluginInitialize { + if ([self isEmailAvailable]) { + [self cycleTheGlobalMailComposer]; + } +} + +- (void)available:(CDVInvokedUrlCommand*)command { + BOOL avail = NO; + if (NSClassFromString(@"UIActivityViewController")) { + avail = YES; + } + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:avail]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (NSString*)getIPadPopupCoordinates { + if (_popupCoordinates != nil) { + return _popupCoordinates; + } + if ([self.webView respondsToSelector:@selector(stringByEvaluatingJavaScriptFromString:)]) { + return [(UIWebView*)self.webView stringByEvaluatingJavaScriptFromString:@"window.plugins.socialsharing.iPadPopupCoordinates();"]; + } else { + // prolly a wkwebview, ignoring for now + return nil; + } +} + +- (void)setIPadPopupCoordinates:(CDVInvokedUrlCommand*)command { + _popupCoordinates = [command.arguments objectAtIndex:0]; +} + +- (CGRect)getPopupRectFromIPadPopupCoordinates:(NSArray*)comps { + CGRect rect = CGRectZero; + if ([comps count] == 4) { + rect = CGRectMake([[comps objectAtIndex:0] integerValue], [[comps objectAtIndex:1] integerValue], [[comps objectAtIndex:2] integerValue], [[comps objectAtIndex:3] integerValue]); + } + return rect; +} + +- (void)share:(CDVInvokedUrlCommand*)command { + [self.commandDelegate runInBackground:^{ //avoid main thread block especially if sharing big files from url + if (!NSClassFromString(@"UIActivityViewController")) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + return; + } + + NSString *message = [command.arguments objectAtIndex:0]; + NSString *subject = [command.arguments objectAtIndex:1]; + NSArray *filenames = [command.arguments objectAtIndex:2]; + NSString *urlString = [command.arguments objectAtIndex:3]; + + NSMutableArray *activityItems = [[NSMutableArray alloc] init]; + [activityItems addObject:message]; + + NSMutableArray *files = [[NSMutableArray alloc] init]; + if (filenames != (id)[NSNull null] && filenames.count > 0) { + for (NSString* filename in filenames) { + NSObject *file = [self getImage:filename]; + if (file == nil) { + file = [self getFile:filename]; + } + if (file != nil) { + [files addObject:file]; + } + } + [activityItems addObjectsFromArray:files]; + } + + if (urlString != (id)[NSNull null]) { + [activityItems addObject:[NSURL URLWithString:urlString]]; + } + + UIActivity *activity = [[UIActivity alloc] init]; + NSArray *applicationActivities = [[NSArray alloc] initWithObjects:activity, nil]; + UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:applicationActivities]; + if (subject != (id)[NSNull null]) { + [activityVC setValue:subject forKey:@"subject"]; + } + + // TODO deprecated in iOS 8.0, change this some day + [activityVC setCompletionHandler:^(NSString *activityType, BOOL completed) { + [self cleanupStoredFiles]; + NSLog(@"SocialSharing app selected: %@", activityType); + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:completed]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; + + NSArray * socialSharingExcludeActivities = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"SocialSharingExcludeActivities"]; + if (socialSharingExcludeActivities!=nil && [socialSharingExcludeActivities count] > 0) { + activityVC.excludedActivityTypes = socialSharingExcludeActivities; + } + + dispatch_async(dispatch_get_main_queue(), ^(void){ + // iPad on iOS >= 8 needs a different approach + if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { + NSString* iPadCoords = [self getIPadPopupCoordinates]; + if (iPadCoords != nil && ![iPadCoords isEqual:@"-1,-1,-1,-1"]) { + NSArray *comps = [iPadCoords componentsSeparatedByString:@","]; + CGRect rect = [self getPopupRectFromIPadPopupCoordinates:comps]; + if ([activityVC respondsToSelector:@selector(popoverPresentationController)]) { +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 // iOS 8.0 supported + activityVC.popoverPresentationController.sourceView = self.webView; + activityVC.popoverPresentationController.sourceRect = rect; +#endif + } else { + _popover = [[UIPopoverController alloc] initWithContentViewController:activityVC]; + _popover.delegate = self; + [_popover presentPopoverFromRect:rect inView:self.webView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; + } + } else if ([activityVC respondsToSelector:@selector(popoverPresentationController)]) { +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 // iOS 8.0 supported + activityVC.popoverPresentationController.sourceView = self.webView; + // position the popup at the bottom, just like iOS < 8 did (and iPhone still does on iOS 8) + NSArray *comps = [NSArray arrayWithObjects: + [NSNumber numberWithInt:(self.viewController.view.frame.size.width/2)-200], + [NSNumber numberWithInt:self.viewController.view.frame.size.height], + [NSNumber numberWithInt:400], + [NSNumber numberWithInt:400], + nil]; + CGRect rect = [self getPopupRectFromIPadPopupCoordinates:comps]; + activityVC.popoverPresentationController.sourceRect = rect; +#endif + } + } + [[self getTopMostViewController] presentViewController:activityVC animated:YES completion:nil]; + }); + }]; +} + +- (void)shareViaTwitter:(CDVInvokedUrlCommand*)command { + [self shareViaInternal:command type:SLServiceTypeTwitter]; +} + +- (void)shareViaFacebook:(CDVInvokedUrlCommand*)command { + [self shareViaInternal:command type:SLServiceTypeFacebook]; +} + +- (void)shareViaFacebookWithPasteMessageHint:(CDVInvokedUrlCommand*)command { + // If Fb app is installed a message is not prefilled. + // When shared through the default iOS widget (iOS Settings > Facebook) the message is prefilled already. + NSString *message = [command.arguments objectAtIndex:0]; + if (message != (id)[NSNull null]) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1000 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{ + BOOL fbAppInstalled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]; // requires whitelisting on iOS9 + if (fbAppInstalled) { + UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; + [pasteboard setValue:message forPasteboardType:@"public.text"]; + NSString *hint = [command.arguments objectAtIndex:4]; + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:hint delegate:nil cancelButtonTitle:nil otherButtonTitles:nil]; + [alert show]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2800 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{ + [alert dismissWithClickedButtonIndex:-1 animated:YES]; + }); + } + }); + } + [self shareViaInternal:command type:SLServiceTypeFacebook]; +} + +- (void)shareVia:(CDVInvokedUrlCommand*)command { + [self shareViaInternal:command type:[command.arguments objectAtIndex:4]]; +} + +- (void)canShareVia:(CDVInvokedUrlCommand*)command { + NSString *via = [command.arguments objectAtIndex:4]; + CDVPluginResult * pluginResult; + if ([@"sms" caseInsensitiveCompare:via] == NSOrderedSame && [self canShareViaSMS]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else if ([@"email" caseInsensitiveCompare:via] == NSOrderedSame && [self isEmailAvailable]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else if ([@"whatsapp" caseInsensitiveCompare:via] == NSOrderedSame && [self canShareViaWhatsApp]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else if ([@"instagram" caseInsensitiveCompare:via] == NSOrderedSame && [self canShareViaInstagram]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else if ([self isAvailableForSharing:command type:via]) { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + } else { + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + } + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; +} + +- (void)canShareViaEmail:(CDVInvokedUrlCommand*)command { + if ([self isEmailAvailable]) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } else { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } +} + +- (bool)isEmailAvailable { + Class messageClass = (NSClassFromString(@"MFMailComposeViewController")); + return messageClass != nil && [messageClass canSendMail]; +} + +- (bool)isAvailableForSharing:(CDVInvokedUrlCommand*)command + type:(NSString *) type { + // isAvailableForServiceType returns true if you pass it a type that is not + // in the defined constants, this is probably a bug on apples part + if(!([type isEqualToString:SLServiceTypeFacebook] + || [type isEqualToString:SLServiceTypeTwitter] + || [type isEqualToString:SLServiceTypeTencentWeibo] + || [type isEqualToString:SLServiceTypeSinaWeibo])) { + return false; + } + // wrapped in try-catch, because isAvailableForServiceType may crash if an invalid type is passed + @try { + return [SLComposeViewController isAvailableForServiceType:type]; + } + @catch (NSException* exception) { + return false; + } +} + +- (void)shareViaInternal:(CDVInvokedUrlCommand*)command + type:(NSString *) type { + + NSString *message = [command.arguments objectAtIndex:0]; + // subject is not supported by the SLComposeViewController + NSArray *filenames = [command.arguments objectAtIndex:2]; + NSString *urlString = [command.arguments objectAtIndex:3]; + + // boldly invoke the target app, because the phone will display a nice message asking to configure the app + SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:type]; + if (message != (id)[NSNull null]) { + [composeViewController setInitialText:message]; + } + + for (NSString* filename in filenames) { + UIImage* image = [self getImage:filename]; + if (image != nil) { + [composeViewController addImage:image]; + } + } + + if (urlString != (id)[NSNull null]) { + [composeViewController addURL:[NSURL URLWithString:urlString]]; + } + + [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) { + if (SLComposeViewControllerResultCancelled == result) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"cancelled"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } else if ([self isAvailableForSharing:command type:type]) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:SLComposeViewControllerResultDone == result]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } else { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } + // required for iOS6 (issues #162 and #167) + [self.viewController dismissViewControllerAnimated:YES completion:nil]; + }]; + [[self getTopMostViewController] presentViewController:composeViewController animated:YES completion:nil]; +} + +- (void)shareViaEmail:(CDVInvokedUrlCommand*)command { + if ([self isEmailAvailable]) { + + if (TARGET_IPHONE_SIMULATOR && IsAtLeastiOSVersion(@"8.0")) { + UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"SocialSharing plugin" + message:@"Sharing via email is not supported on the iOS 8 simulator." + delegate:nil + cancelButtonTitle:@"OK" + otherButtonTitles:nil]; + [alert show]; + return; + } + + self.globalMailComposer.mailComposeDelegate = self; + + if ([command.arguments objectAtIndex:0] != (id)[NSNull null]) { + NSString *message = [command.arguments objectAtIndex:0]; + BOOL isHTML = [message rangeOfString:@"<[^>]+>" options:NSRegularExpressionSearch].location != NSNotFound; + [self.globalMailComposer setMessageBody:message isHTML:isHTML]; + } + + if ([command.arguments objectAtIndex:1] != (id)[NSNull null]) { + [self.globalMailComposer setSubject: [command.arguments objectAtIndex:1]]; + } + + if ([command.arguments objectAtIndex:2] != (id)[NSNull null]) { + [self.globalMailComposer setToRecipients:[command.arguments objectAtIndex:2]]; + } + + if ([command.arguments objectAtIndex:3] != (id)[NSNull null]) { + [self.globalMailComposer setCcRecipients:[command.arguments objectAtIndex:3]]; + } + + if ([command.arguments objectAtIndex:4] != (id)[NSNull null]) { + [self.globalMailComposer setBccRecipients:[command.arguments objectAtIndex:4]]; + } + + if ([command.arguments objectAtIndex:5] != (id)[NSNull null]) { + NSArray* attachments = [command.arguments objectAtIndex:5]; + NSFileManager* fileManager = [NSFileManager defaultManager]; + for (NSString* path in attachments) { + NSURL *file = [self getFile:path]; + NSData* data = [fileManager contentsAtPath:file.path]; + + NSString* fileName; + NSString* mimeType; + NSString* basename = [self getBasenameFromAttachmentPath:path]; + + if ([basename hasPrefix:@"data:"]) { + mimeType = (NSString*)[[[basename substringFromIndex:5] componentsSeparatedByString: @";"] objectAtIndex:0]; + fileName = @"attachment."; + fileName = [fileName stringByAppendingString:(NSString*)[[mimeType componentsSeparatedByString: @"/"] lastObject]]; + NSString *base64content = (NSString*)[[basename componentsSeparatedByString: @","] lastObject]; + data = [SocialSharing dataFromBase64String:base64content]; + } else { + fileName = [basename pathComponents].lastObject; + mimeType = [self getMimeTypeFromFileExtension:[basename pathExtension]]; + } + [self.globalMailComposer addAttachmentData:data mimeType:mimeType fileName:fileName]; + } + } + + // remember the command, because we need it in the didFinishWithResult method + _command = command; + + [self.commandDelegate runInBackground:^{ + [[self getTopMostViewController] presentViewController:self.globalMailComposer animated:YES completion:nil]; + }]; + + } else { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } +} + +- (UIViewController*) getTopMostViewController { + UIViewController *presentingViewController = [[[UIApplication sharedApplication] delegate] window].rootViewController; + while (presentingViewController.presentedViewController != nil) { + presentingViewController = presentingViewController.presentedViewController; + } + return presentingViewController; +} + +- (NSString*) getBasenameFromAttachmentPath:(NSString*)path { + if ([path hasPrefix:@"base64:"]) { + NSString* pathWithoutPrefix = [path stringByReplacingOccurrencesOfString:@"base64:" withString:@""]; + return [pathWithoutPrefix substringToIndex:[pathWithoutPrefix rangeOfString:@"//"].location]; + } + return path; +} + +- (NSString*) getMimeTypeFromFileExtension:(NSString*)extension { + if (!extension) { + return nil; + } + // Get the UTI from the file's extension + CFStringRef ext = (CFStringRef)CFBridgingRetain(extension); + CFStringRef type = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, ext, NULL); + // Converting UTI to a mime type + NSString *result = (NSString*)CFBridgingRelease(UTTypeCopyPreferredTagWithClass(type, kUTTagClassMIMEType)); + CFRelease(ext); + CFRelease(type); + return result; +} + +/** + * Delegate will be called after the mail composer did finish an action + * to dismiss the view. + */ +- (void) mailComposeController:(MFMailComposeViewController*)controller + didFinishWithResult:(MFMailComposeResult)result + error:(NSError*)error { + bool ok = result == MFMailComposeResultSent; + [self.globalMailComposer dismissViewControllerAnimated:YES completion:^{[self cycleTheGlobalMailComposer];}]; + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:ok]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:_command.callbackId]; +} + +-(void)cycleTheGlobalMailComposer { + // we are cycling the damned GlobalMailComposer: http://stackoverflow.com/questions/25604552/i-have-real-misunderstanding-with-mfmailcomposeviewcontroller-in-swift-ios8-in/25604976#25604976 + self.globalMailComposer = nil; + self.globalMailComposer = [[MFMailComposeViewController alloc] init]; +} + +- (bool)canShareViaSMS { + Class messageClass = (NSClassFromString(@"MFMessageComposeViewController")); + return messageClass != nil && [messageClass canSendText]; +} + +- (void)shareViaSMS:(CDVInvokedUrlCommand*)command { + if ([self canShareViaSMS]) { + NSDictionary* options = [command.arguments objectAtIndex:0]; + NSString *phonenumbers = [command.arguments objectAtIndex:1]; + NSString *message = [options objectForKey:@"message"]; + NSString *subject = [options objectForKey:@"subject"]; + NSString *image = [options objectForKey:@"image"]; + + MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init]; + picker.messageComposeDelegate = (id) self; + if (message != (id)[NSNull null]) { + picker.body = message; + } + if (subject != (id)[NSNull null]) { + [picker setSubject:subject]; + } + if (image != nil && image != (id)[NSNull null]) { + BOOL canSendAttachments = [[MFMessageComposeViewController class] respondsToSelector:@selector(canSendAttachments)]; + if (canSendAttachments) { + NSURL *file = [self getFile:image]; + if (file != nil) { + [picker addAttachmentURL:file withAlternateFilename:nil]; + } + } + } + + if (phonenumbers != (id)[NSNull null]) { + [picker setRecipients:[phonenumbers componentsSeparatedByString:@","]]; + } + // remember the command, because we need it in the didFinishWithResult method + _command = command; + [self.commandDelegate runInBackground:^{ + picker.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; + [[self getTopMostViewController] presentViewController:picker animated:YES completion:nil]; + }]; + } else { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } +} + +// Dismisses the SMS composition interface when users taps Cancel or Send +- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result { + bool ok = result == MessageComposeResultSent; + [[self getTopMostViewController] dismissViewControllerAnimated:YES completion:nil]; + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:ok]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:_command.callbackId]; +} + +- (bool)canShareViaInstagram { + return [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"instagram://app"]]; // requires whitelisting on iOS9 +} + +- (bool)canShareViaWhatsApp { + return [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]; // requires whitelisting on iOS9 +} + +// this is only an internal test method for now, can be used to open a share sheet with 'Open in xx' links for tumblr, drive, dropbox, .. +- (void)openImage:(NSString *)imageName { + UIImage* image =[self getImage:imageName]; + if (image != nil) { + NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/myTempImage.jpg"]; + [UIImageJPEGRepresentation(image, 1.0) writeToFile:savePath atomically:YES]; + _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]]; + _documentInteractionController.UTI = @""; // TODO find the scheme for google drive and create a shareViaGoogleDrive function + [_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.viewController.view animated: YES]; + } +} + +- (void)shareViaInstagram:(CDVInvokedUrlCommand*)command { + + // on iOS9 canShareVia('instagram'..) will only work if instagram:// is whitelisted. + // If it's not, this method will ask permission to the user on iOS9 for opening the app, + // which is of course better than Instagram sharing not working at all because you forgot to whitelist it. + // Tradeoff: on iOS9 this method will always return true, so make sure to whitelist it and call canShareVia('instagram'..) + if (!IsAtLeastiOSVersion(@"9.0")) { + if (![self canShareViaInstagram]) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + return; + } + } + + NSString *message = [command.arguments objectAtIndex:0]; + // subject is not supported by the SLComposeViewController + NSArray *filenames = [command.arguments objectAtIndex:2]; + + // only use the first image (for now.. maybe we can share in a loop?) + UIImage* image = nil; + for (NSString* filename in filenames) { + image = [self getImage:filename]; + break; + } + +// NSData *imageObj = [NSData dataFromBase64String:objectAtIndex0]; + NSString *tmpDir = NSTemporaryDirectory(); + NSString *path = [tmpDir stringByAppendingPathComponent:@"instagram.igo"]; + [UIImageJPEGRepresentation(image, 1.0) writeToFile:path atomically:YES]; + + _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:path]]; + _documentInteractionController.delegate = self; + _documentInteractionController.UTI = @"com.instagram.exclusivegram"; + + if (message != (id)[NSNull null]) { + // no longer working, so .. + _documentInteractionController.annotation = @{@"InstagramCaption" : message}; + + // .. we put the message on the clipboard (you app can prompt the user to paste it) + UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; + [pasteboard setValue:message forPasteboardType:@"public.text"]; + } + + // remember the command for the delegate method + _command = command; + [_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.webView animated:YES]; +} + +- (void)shareViaWhatsApp:(CDVInvokedUrlCommand*)command { + + // on iOS9 canShareVia('whatsapp'..) will only work if whatsapp:// is whitelisted. + // If it's not, this method will ask permission to the user on iOS9 for opening the app, + // which is of course better than WhatsApp sharing not working at all because you forgot to whitelist it. + // Tradeoff: on iOS9 this method will always return true, so make sure to whitelist it and call canShareVia('whatsapp'..) + if (!IsAtLeastiOSVersion(@"9.0")) { + if (![self canShareViaWhatsApp]) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + return; + } + } + + NSString *message = [command.arguments objectAtIndex:0]; + // subject is not supported by the SLComposeViewController + NSArray *filenames = [command.arguments objectAtIndex:2]; + NSString *urlString = [command.arguments objectAtIndex:3]; + + // only use the first image (for now.. maybe we can share in a loop?) + UIImage* image = nil; + for (NSString* filename in filenames) { + image = [self getImage:filename]; + break; + } + + // with WhatsApp, we can share an image OR text+url.. image wins if set + if (image != nil) { + NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"]; + [UIImageJPEGRepresentation(image, 1.0) writeToFile:savePath atomically:YES]; + _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]]; + _documentInteractionController.UTI = @"net.whatsapp.image"; + _documentInteractionController.delegate = self; + _command = command; + [_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.viewController.view animated: YES]; + } else { + // append an url to a message, if both are passed + NSString * shareString = @""; + if (message != (id)[NSNull null]) { + shareString = message; + } + if (urlString != (id)[NSNull null]) { + if ([shareString isEqual: @""]) { + shareString = urlString; + } else { + shareString = [NSString stringWithFormat:@"%@ %@", shareString, urlString]; + } + } + NSString * encodedShareString = [shareString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + // also encode the '=' character + encodedShareString = [encodedShareString stringByReplacingOccurrencesOfString:@"=" withString:@"%3D"]; + encodedShareString = [encodedShareString stringByReplacingOccurrencesOfString:@"&" withString:@"%26"]; + NSString * encodedShareStringForWhatsApp = [NSString stringWithFormat:@"whatsapp://send?text=%@", encodedShareString]; + + NSURL *whatsappURL = [NSURL URLWithString:encodedShareStringForWhatsApp]; + [[UIApplication sharedApplication] openURL: whatsappURL]; + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + } +} + +- (void)saveToPhotoAlbum:(CDVInvokedUrlCommand*)command { + self.command = command; + NSArray *filenames = [command.arguments objectAtIndex:0]; + [self.commandDelegate runInBackground:^{ + bool shared = false; + for (NSString* filename in filenames) { + UIImage* image = [self getImage:filename]; + if (image != nil) { + shared = true; + UIImageWriteToSavedPhotosAlbum(image, self, @selector(thisImage:wasSavedToPhotoAlbumWithError:contextInfo:), nil); + } + } + if (!shared) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"no valid image was passed"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.command.callbackId]; + } + }]; +} + +// called from saveToPhotoAlbum, note that we only send feedback for the first image that's being saved (not keeping the callback) +// but since the UIImageWriteToSavedPhotosAlbum function is only called with valid images that should not be a problem +- (void)thisImage:(UIImage *)image wasSavedToPhotoAlbumWithError:(NSError *)error contextInfo:(void*)ctxInfo { + if (error) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:error.localizedDescription]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.command.callbackId]; + } else { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.command.callbackId]; + } +} + +-(UIImage*)getImage: (NSString *)imageName { + UIImage *image = nil; + if (imageName != (id)[NSNull null]) { + if ([imageName hasPrefix:@"http"]) { + image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageName]]]; + } else if ([imageName hasPrefix:@"www/"]) { + image = [UIImage imageNamed:imageName]; + } else if ([imageName hasPrefix:@"file://"]) { + image = [UIImage imageWithData:[NSData dataWithContentsOfFile:[[NSURL URLWithString:imageName] path]]]; + } else if ([imageName hasPrefix:@"data:"]) { + // using a base64 encoded string + NSURL *imageURL = [NSURL URLWithString:imageName]; + NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; + image = [UIImage imageWithData:imageData]; + } else if ([imageName hasPrefix:@"assets-library://"]) { + // use assets-library + NSURL *imageURL = [NSURL URLWithString:imageName]; + NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; + image = [UIImage imageWithData:imageData]; + } else { + // assume anywhere else, on the local filesystem + image = [UIImage imageWithData:[NSData dataWithContentsOfFile:imageName]]; + } + } + return image; +} + +-(NSURL*)getFile: (NSString *)fileName { + NSURL *file = nil; + if (fileName != (id)[NSNull null]) { + if ([fileName hasPrefix:@"http"]) { + NSURL *url = [NSURL URLWithString:fileName]; + NSData *fileData = [NSData dataWithContentsOfURL:url]; + file = [NSURL fileURLWithPath:[self storeInFile:(NSString*)[[fileName componentsSeparatedByString: @"/"] lastObject] fileData:fileData]]; + } else if ([fileName hasPrefix:@"www/"]) { + NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; + NSString *fullPath = [NSString stringWithFormat:@"%@/%@", bundlePath, fileName]; + file = [NSURL fileURLWithPath:fullPath]; + } else if ([fileName hasPrefix:@"file://"]) { + // stripping the first 6 chars, because the path should start with / instead of file:// + file = [NSURL fileURLWithPath:[fileName substringFromIndex:6]]; + } else if ([fileName hasPrefix:@"data:"]) { + // using a base64 encoded string + // extract some info from the 'fileName', which is for example: data:text/calendar;base64, + NSString *fileType = (NSString*)[[[fileName substringFromIndex:5] componentsSeparatedByString: @";"] objectAtIndex:0]; + fileType = (NSString*)[[fileType componentsSeparatedByString: @"/"] lastObject]; + NSString *base64content = (NSString*)[[fileName componentsSeparatedByString: @","] lastObject]; + NSData *fileData = [SocialSharing dataFromBase64String:base64content]; + file = [NSURL fileURLWithPath:[self storeInFile:[NSString stringWithFormat:@"%@.%@", @"file", fileType] fileData:fileData]]; + } else { + // assume anywhere else, on the local filesystem + file = [NSURL fileURLWithPath:fileName]; + } + } + return file; +} + +-(NSString*) storeInFile: (NSString*) fileName + fileData: (NSData*) fileData { + NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); + NSString *documentsDirectory = [paths objectAtIndex:0]; + NSString *filePath = [documentsDirectory stringByAppendingPathComponent:fileName]; + [fileData writeToFile:filePath atomically:YES]; + _tempStoredFile = filePath; + return filePath; +} + +- (void) cleanupStoredFiles { + if (_tempStoredFile != nil) { + NSError *error; + [[NSFileManager defaultManager]removeItemAtPath:_tempStoredFile error:&error]; + } +} + ++ (NSData*) dataFromBase64String:(NSString*)aString { + return [[NSData alloc] initWithBase64EncodedString:aString options:0]; +} + +#pragma mark - UIPopoverControllerDelegate methods + +- (void)popoverController:(UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view { + NSArray *comps = [[self getIPadPopupCoordinates] componentsSeparatedByString:@","]; + CGRect newRect = [self getPopupRectFromIPadPopupCoordinates:comps]; + rect->origin = newRect.origin; +} + +- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController { + _popover = nil; +} + +#pragma mark - UIDocumentInteractionControllerDelegate methods + +- (void) documentInteractionController: (UIDocumentInteractionController *) controller willBeginSendingToApplication: (NSString *) application { + // note that the application actually contains the app bundle id which was picked (for whatsapp and instagram only) + NSLog(@"SocialSharing app selected: %@", application); +} + +- (void) documentInteractionControllerDidDismissOpenInMenu: (UIDocumentInteractionController *) controller { + if (self.command != nil) { + CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:result callbackId: self.command.callbackId]; + } +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.h b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.h new file mode 100644 index 00000000..be79903e --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.h @@ -0,0 +1,21 @@ +// +// AppDelegate+notification.h +// pushtest +// +// Created by Robert Easterday on 10/26/12. +// +// + +#import "AppDelegate.h" + +@interface AppDelegate (notification) +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; +- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; +- (void)applicationDidBecomeActive:(UIApplication *)application; +- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler; +- (id) getCommandInstance:(NSString*)className; + +@property (nonatomic, retain) NSDictionary *launchNotification; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.m b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.m new file mode 100644 index 00000000..8b4ed161 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/AppDelegate+notification.m @@ -0,0 +1,167 @@ +// +// AppDelegate+notification.m +// pushtest +// +// Created by Robert Easterday on 10/26/12. +// +// + +#import "AppDelegate+notification.h" +#import "PushPlugin.h" +#import + +static char launchNotificationKey; + +@implementation AppDelegate (notification) + +- (id) getCommandInstance:(NSString*)className +{ + return [self.viewController getCommandInstance:className]; +} + +// its dangerous to override a method from within a category. +// Instead we will use method swizzling. we set this up in the load call. ++ (void)load +{ + Method original, swizzled; + + original = class_getInstanceMethod(self, @selector(init)); + swizzled = class_getInstanceMethod(self, @selector(swizzled_init)); + method_exchangeImplementations(original, swizzled); +} + +- (AppDelegate *)swizzled_init +{ + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(createNotificationChecker:) + name:@"UIApplicationDidFinishLaunchingNotification" object:nil]; + + // This actually calls the original init method over in AppDelegate. Equivilent to calling super + // on an overrided method, this is not recursive, although it appears that way. neat huh? + return [self swizzled_init]; +} + +// This code will be called immediately after application:didFinishLaunchingWithOptions:. We need +// to process notifications in cold-start situations +- (void)createNotificationChecker:(NSNotification *)notification +{ + if (notification) + { + NSDictionary *launchOptions = [notification userInfo]; + if (launchOptions) + self.launchNotification = [launchOptions objectForKey: @"UIApplicationLaunchOptionsRemoteNotificationKey"]; + } +} + +- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; + [pushHandler didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; +} + +- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { + PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; + [pushHandler didFailToRegisterForRemoteNotificationsWithError:error]; +} + +- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { + NSLog(@"didReceiveNotification with fetchCompletionHandler"); + + // app is in the foreground so call notification callback + if (application.applicationState == UIApplicationStateActive) { + NSLog(@"app active"); + PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; + pushHandler.notificationMessage = userInfo; + pushHandler.isInline = YES; + [pushHandler notificationReceived]; + + completionHandler(UIBackgroundFetchResultNewData); + } + // app is in background or in stand by + else { + NSLog(@"app in-active"); + + // do some convoluted logic to find out if this should be a silent push. + long silent = 0; + id aps = [userInfo objectForKey:@"aps"]; + id contentAvailable = [aps objectForKey:@"content-available"]; + if ([contentAvailable isKindOfClass:[NSString class]] && [contentAvailable isEqualToString:@"1"]) { + silent = 1; + } else if ([contentAvailable isKindOfClass:[NSNumber class]]) { + silent = [contentAvailable integerValue]; + } + + if (silent == 1) { + NSLog(@"this should be a silent push"); + void (^safeHandler)(UIBackgroundFetchResult) = ^(UIBackgroundFetchResult result){ + dispatch_async(dispatch_get_main_queue(), ^{ + completionHandler(result); + }); + }; + + NSMutableDictionary* params = [NSMutableDictionary dictionaryWithCapacity:2]; + [params setObject:safeHandler forKey:@"handler"]; + + PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; + pushHandler.notificationMessage = userInfo; + pushHandler.isInline = NO; + pushHandler.handlerObj = params; + [pushHandler notificationReceived]; + } else { + NSLog(@"just put it in the shade"); + //save it for later + self.launchNotification = userInfo; + + completionHandler(UIBackgroundFetchResultNewData); + } + } +} + +- (void)applicationDidBecomeActive:(UIApplication *)application { + + NSLog(@"active"); + + PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; + if (pushHandler.clearBadge) { + NSLog(@"PushPlugin clearing badge"); + //zero badge + application.applicationIconBadgeNumber = 0; + } else { + NSLog(@"PushPlugin skip clear badge"); + } + + if (self.launchNotification) { + pushHandler.isInline = NO; + pushHandler.notificationMessage = self.launchNotification; + self.launchNotification = nil; + [pushHandler performSelectorOnMainThread:@selector(notificationReceived) withObject:pushHandler waitUntilDone:NO]; + } +} + +//For interactive notification only +- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler +{ + //handle the actions + if ([identifier isEqualToString:@"declineAction"]){ + } + else if ([identifier isEqualToString:@"answerAction"]){ + } +} + + +// The accessors use an Associative Reference since you can't define a iVar in a category +// http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/Chapters/ocAssociativeReferences.html +- (NSMutableArray *)launchNotification +{ + return objc_getAssociatedObject(self, &launchNotificationKey); +} + +- (void)setLaunchNotification:(NSDictionary *)aDictionary +{ + objc_setAssociatedObject(self, &launchNotificationKey, aDictionary, OBJC_ASSOCIATION_RETAIN_NONATOMIC); +} + +- (void)dealloc +{ + self.launchNotification = nil; // clear the association and release the object +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.h b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.h new file mode 100644 index 00000000..5b88398e --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.h @@ -0,0 +1,62 @@ +/* + Copyright 2009-2011 Urban Airship Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binaryform must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided withthe distribution. + + THIS SOFTWARE IS PROVIDED BY THE URBAN AIRSHIP INC``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL URBAN AIRSHIP INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import +#import +#import + +@interface PushPlugin : CDVPlugin +{ + NSDictionary *notificationMessage; + BOOL isInline; + NSString *notificationCallbackId; + NSString *callback; + BOOL clearBadge; + + NSDictionary *handlerObj; + void (^completionHandler)(UIBackgroundFetchResult); + + BOOL ready; +} + +@property (nonatomic, copy) NSString *callbackId; +@property (nonatomic, copy) NSString *notificationCallbackId; +@property (nonatomic, copy) NSString *callback; + +@property (nonatomic, strong) NSDictionary *notificationMessage; +@property BOOL isInline; +@property BOOL clearBadge; +@property (nonatomic, strong) NSDictionary *handlerObj; + +- (void)init:(CDVInvokedUrlCommand*)command; +- (void)unregister:(CDVInvokedUrlCommand*)command; + +- (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; +- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; + +- (void)setNotificationMessage:(NSDictionary *)notification; +- (void)notificationReceived; + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.m b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.m new file mode 100644 index 00000000..40f494d1 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/phonegap-plugin-push/PushPlugin.m @@ -0,0 +1,347 @@ +/* + Copyright 2009-2011 Urban Airship Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + 2. Redistributions in binaryform must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided withthe distribution. + + THIS SOFTWARE IS PROVIDED BY THE URBAN AIRSHIP INC``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL URBAN AIRSHIP INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#import "PushPlugin.h" + +@implementation PushPlugin + +@synthesize notificationMessage; +@synthesize isInline; + +@synthesize callbackId; +@synthesize notificationCallbackId; +@synthesize callback; +@synthesize clearBadge; +@synthesize handlerObj; + +- (void)unregister:(CDVInvokedUrlCommand*)command; +{ + self.callbackId = command.callbackId; + + [[UIApplication sharedApplication] unregisterForRemoteNotifications]; + [self successWithMessage:@"unregistered"]; +} + +- (void)init:(CDVInvokedUrlCommand*)command; +{ + [self.commandDelegate runInBackground:^ { + + NSLog(@"Push Plugin register called"); + self.callbackId = command.callbackId; + + NSMutableDictionary* options = [command.arguments objectAtIndex:0]; + NSMutableDictionary* iosOptions = [options objectForKey:@"ios"]; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + UIUserNotificationType UserNotificationTypes = UIUserNotificationTypeNone; +#endif + UIRemoteNotificationType notificationTypes = UIRemoteNotificationTypeNone; + + id badgeArg = [iosOptions objectForKey:@"badge"]; + id soundArg = [iosOptions objectForKey:@"sound"]; + id alertArg = [iosOptions objectForKey:@"alert"]; + id clearBadgeArg = [iosOptions objectForKey:@"clearBadge"]; + + if (([badgeArg isKindOfClass:[NSString class]] && [badgeArg isEqualToString:@"true"]) || [badgeArg boolValue]) + { + notificationTypes |= UIRemoteNotificationTypeBadge; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + UserNotificationTypes |= UIUserNotificationTypeBadge; +#endif + } + + if (([soundArg isKindOfClass:[NSString class]] && [soundArg isEqualToString:@"true"]) || [soundArg boolValue]) + { + notificationTypes |= UIRemoteNotificationTypeSound; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + UserNotificationTypes |= UIUserNotificationTypeSound; +#endif + } + + if (([alertArg isKindOfClass:[NSString class]] && [alertArg isEqualToString:@"true"]) || [alertArg boolValue]) + { + notificationTypes |= UIRemoteNotificationTypeAlert; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + UserNotificationTypes |= UIUserNotificationTypeAlert; +#endif + } + + notificationTypes |= UIRemoteNotificationTypeNewsstandContentAvailability; +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + UserNotificationTypes |= UIUserNotificationActivationModeBackground; +#endif + + if (clearBadgeArg == nil || ([clearBadgeArg isKindOfClass:[NSString class]] && [clearBadgeArg isEqualToString:@"false"]) || ![clearBadgeArg boolValue]) { + NSLog(@"PushPlugin.register: setting badge to false"); + clearBadge = NO; + } else { + NSLog(@"PushPlugin.register: setting badge to true"); + clearBadge = YES; + [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; + } + NSLog(@"PushPlugin.register: clear badge is set to %d", clearBadge); + + if (notificationTypes == UIRemoteNotificationTypeNone) + NSLog(@"PushPlugin.register: Push notification type is set to none"); + + isInline = NO; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 + if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) { + UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UserNotificationTypes categories:nil]; + [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; + [[UIApplication sharedApplication] registerForRemoteNotifications]; + } else { + [[UIApplication sharedApplication] registerForRemoteNotificationTypes: + (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; + } +#else + [[UIApplication sharedApplication] registerForRemoteNotificationTypes: + (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; +#endif + + if (notificationMessage) // if there is a pending startup notification + [self notificationReceived]; // go ahead and process it + + }]; +} + +- (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { + if (self.callbackId == nil) { + NSLog(@"Unexpected call to didRegisterForRemoteNotificationsWithDeviceToken, ignoring: %@", deviceToken); + return; + } + NSLog(@"Push Plugin register success: %@", deviceToken); + + NSMutableDictionary *results = [NSMutableDictionary dictionary]; + NSString *token = [[[[deviceToken description] stringByReplacingOccurrencesOfString:@"<"withString:@""] + stringByReplacingOccurrencesOfString:@">" withString:@""] + stringByReplacingOccurrencesOfString: @" " withString: @""]; + [results setValue:token forKey:@"deviceToken"]; + +#if !TARGET_IPHONE_SIMULATOR + // Get Bundle Info for Remote Registration (handy if you have more than one app) + [results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"] forKey:@"appName"]; + [results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"appVersion"]; + + // Check what Notifications the user has turned on. We registered for all three, but they may have manually disabled some or all of them. +#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) + + NSUInteger rntypes; + if (!SYSTEM_VERSION_LESS_THAN(@"8.0")) { + rntypes = [[[UIApplication sharedApplication] currentUserNotificationSettings] types]; + } else { + rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; + } + + // Set the defaults to disabled unless we find otherwise... + NSString *pushBadge = @"disabled"; + NSString *pushAlert = @"disabled"; + NSString *pushSound = @"disabled"; + + // Check what Registered Types are turned on. This is a bit tricky since if two are enabled, and one is off, it will return a number 2... not telling you which + // one is actually disabled. So we are literally checking to see if rnTypes matches what is turned on, instead of by number. The "tricky" part is that the + // single notification types will only match if they are the ONLY one enabled. Likewise, when we are checking for a pair of notifications, it will only be + // true if those two notifications are on. This is why the code is written this way + if(rntypes & UIRemoteNotificationTypeBadge){ + pushBadge = @"enabled"; + } + if(rntypes & UIRemoteNotificationTypeAlert) { + pushAlert = @"enabled"; + } + if(rntypes & UIRemoteNotificationTypeSound) { + pushSound = @"enabled"; + } + + [results setValue:pushBadge forKey:@"pushBadge"]; + [results setValue:pushAlert forKey:@"pushAlert"]; + [results setValue:pushSound forKey:@"pushSound"]; + + // Get the users Device Model, Display Name, Token & Version Number + UIDevice *dev = [UIDevice currentDevice]; + [results setValue:dev.name forKey:@"deviceName"]; + [results setValue:dev.model forKey:@"deviceModel"]; + [results setValue:dev.systemVersion forKey:@"deviceSystemVersion"]; + + // Send result to trigger 'registration' event but keep callback + NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:1]; + [message setObject:token forKey:@"registrationId"]; + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message]; + [pluginResult setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; +#endif +} + +- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error +{ + if (self.callbackId == nil) { + NSLog(@"Unexpected call to didFailToRegisterForRemoteNotificationsWithError, ignoring: %@", error); + return; + } + NSLog(@"Push Plugin register failed"); + [self failWithMessage:@"" withError:error]; +} + +- (void)notificationReceived { + NSLog(@"Notification received"); + + if (notificationMessage && self.callbackId != nil) + { + NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:4]; + NSMutableDictionary* additionalData = [NSMutableDictionary dictionaryWithCapacity:4]; + + + for (id key in notificationMessage) { + if ([key isEqualToString:@"aps"]) { + id aps = [notificationMessage objectForKey:@"aps"]; + + for(id key in aps) { + NSLog(@"Push Plugin key: %@", key); + id value = [aps objectForKey:key]; + + if ([key isEqualToString:@"alert"]) { + if ([value isKindOfClass:[NSDictionary class]]) { + for (id messageKey in value) { + id messageValue = [value objectForKey:messageKey]; + if ([messageKey isEqualToString:@"body"]) { + [message setObject:messageValue forKey:@"message"]; + } else if ([messageKey isEqualToString:@"title"]) { + [message setObject:messageValue forKey:@"title"]; + } else { + [additionalData setObject:messageValue forKey:messageKey]; + } + } + } + else { + [message setObject:value forKey:@"message"]; + } + } else if ([key isEqualToString:@"title"]) { + [message setObject:value forKey:@"title"]; + } else if ([key isEqualToString:@"badge"]) { + [message setObject:value forKey:@"count"]; + } else if ([key isEqualToString:@"sound"]) { + [message setObject:value forKey:@"sound"]; + } else if ([key isEqualToString:@"image"]) { + [message setObject:value forKey:@"image"]; + } else { + [additionalData setObject:value forKey:key]; + } + } + } else { + [additionalData setObject:[notificationMessage objectForKey:key] forKey:key]; + } + } + + if (isInline) { + [additionalData setObject:[NSNumber numberWithBool:YES] forKey:@"foreground"]; + } else { + [additionalData setObject:[NSNumber numberWithBool:NO] forKey:@"foreground"]; + } + + [message setObject:additionalData forKey:@"additionalData"]; + + // send notification message + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message]; + [pluginResult setKeepCallbackAsBool:YES]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; + + self.notificationMessage = nil; + } +} + +- (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command +{ + NSMutableDictionary* options = [command.arguments objectAtIndex:0]; + int badge = [[options objectForKey:@"badge"] intValue] ?: 0; + + [[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge]; + + NSString* message = [NSString stringWithFormat:@"app badge count set to %d", badge]; + CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; + [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId]; +} + +- (void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command +{ + NSInteger badge = [UIApplication sharedApplication].applicationIconBadgeNumber; + + CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)badge]; + [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId]; +} + +-(void)successWithMessage:(NSString *)message +{ + if (self.callbackId != nil) + { + CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; + [self.commandDelegate sendPluginResult:commandResult callbackId:self.callbackId]; + } +} + +-(void)failWithMessage:(NSString *)message withError:(NSError *)error +{ + NSString *errorMessage = (error) ? [NSString stringWithFormat:@"%@ - %@", message, [error localizedDescription]] : message; + CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:errorMessage]; + + [self.commandDelegate sendPluginResult:commandResult callbackId:self.callbackId]; +} + +-(void) finish:(CDVInvokedUrlCommand*)command +{ + NSLog(@"Push Plugin finish called"); + + [self.commandDelegate runInBackground:^ { + UIApplication *app = [UIApplication sharedApplication]; + float finishTimer = (app.backgroundTimeRemaining > 20.0) ? 20.0 : app.backgroundTimeRemaining; + + [NSTimer scheduledTimerWithTimeInterval:finishTimer + target:self + selector:@selector(stopBackgroundTask:) + userInfo:nil + repeats:NO]; + + CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; +} + +-(void)stopBackgroundTask:(NSTimer*)timer +{ + UIApplication *app = [UIApplication sharedApplication]; + + NSLog(@"Push Plugin stopBackgroundTask called"); + + if (handlerObj) { + NSLog(@"Push Plugin handlerObj"); + completionHandler = [handlerObj[@"handler"] copy]; + if (completionHandler) { + NSLog(@"Push Plugin: stopBackgroundTask (remaining t: %f)", app.backgroundTimeRemaining); + completionHandler(UIBackgroundFetchResultNewData); + completionHandler = nil; + } + } +} + +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/CDVNotification.bundle/beep.wav b/StoneIsland/platforms/ios/Stone Island/Resources/CDVNotification.bundle/beep.wav new file mode 100644 index 00000000..05f5997f Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/CDVNotification.bundle/beep.wav differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-568h@2x~iphone.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-568h@2x~iphone.png new file mode 100644 index 00000000..10ed683c Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-568h@2x~iphone.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-667h.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-667h.png new file mode 100644 index 00000000..d9bcf61d Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-667h.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-736h.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-736h.png new file mode 100644 index 00000000..1fcef229 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-736h.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape-736h.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape-736h.png new file mode 100644 index 00000000..eae0792d Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape-736h.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape@2x~ipad.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape@2x~ipad.png new file mode 100644 index 00000000..1fc8c7db Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape@2x~ipad.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape~ipad.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape~ipad.png new file mode 100644 index 00000000..58ea2fbd Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Landscape~ipad.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait@2x~ipad.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait@2x~ipad.png new file mode 100644 index 00000000..1570b37d Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait@2x~ipad.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait~ipad.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait~ipad.png new file mode 100644 index 00000000..223e75d0 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default-Portrait~ipad.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default@2x~iphone.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default@2x~iphone.png new file mode 100644 index 00000000..0098dc73 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default@2x~iphone.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default~iphone.png b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default~iphone.png new file mode 100644 index 00000000..42b8fdea Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/splash/Default~iphone.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist new file mode 100644 index 00000000..0af71059 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -0,0 +1,195 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + icon.png + CFBundleIcons + + CFBundlePrimaryIcon + + CFBundleIconFiles + + icon-40 + icon-small + icon-60 + icon.png + icon@2x + icon-72 + icon-72@2x + + UIPrerenderedIcon + + + + CFBundleIcons~ipad + + CFBundlePrimaryIcon + + CFBundleIconFiles + + icon-small + icon-40 + icon-50 + icon-76 + icon-60 + icon + icon@2x + icon-72 + icon-72@2x + + UIPrerenderedIcon + + + + CFBundleIdentifier + us.okfoc.stoneisland + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 0.1.0 + CFBundleShortVersionString + 0.1.0 + LSRequiresIPhoneOS + + NSMainNibFile + + NSMainNibFile~ipad + + UILaunchImages + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 480} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-568h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {320, 568} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-667h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {375, 667} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-736h + UILaunchImageOrientation + Portrait + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-Landscape-736h + UILaunchImageOrientation + Landscape + UILaunchImageSize + {414, 736} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-Portrait + UILaunchImageOrientation + Portrait + UILaunchImageSize + {768, 1024} + + + UILaunchImageMinimumOSVersion + 8.0 + UILaunchImageName + Default-Landscape + UILaunchImageOrientation + Landscape + UILaunchImageSize + {768, 1024} + + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + + UIBackgroundModes + + remote-notification + + CFBundleURLTypes + + + CFBundleURLSchemes + + stoneisland + + + + + \ No newline at end of file diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch b/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch new file mode 100644 index 00000000..e135f6ba --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ +// +// Prefix header for all source files of the 'HelloCordova' target in the 'HelloCordova' project +// + +#ifdef __OBJC__ + #import + #import +#endif diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml new file mode 100755 index 00000000..10d404b5 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stone Island + + Stone Island + + + OKFocus + + + + + + + + + + + + + + + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island/main.m b/StoneIsland/platforms/ios/Stone Island/main.m new file mode 100644 index 00000000..41282ad0 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/main.m @@ -0,0 +1,35 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ +// +// main.m +// HelloCordova +// +// Created by ___FULLUSERNAME___ on ___DATE___. +// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. +// + +#import + +int main(int argc, char* argv[]) +{ + @autoreleasepool { + int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); + return retVal; + } +} diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.pbxproj b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.pbxproj deleted file mode 100644 index 53038bdc..00000000 --- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.pbxproj +++ /dev/null @@ -1,676 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { -/* Begin PBXBuildFile section */ - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D3623250D0F684500981E51 /* AppDelegate.m */; }; - 1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; }; - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 288765FC0DF74451002DB57D /* CoreGraphics.framework */; }; - 301BF552109A68D80062928A /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 301BF535109A57CC0062928A /* libCordova.a */; }; - 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 302D95EF14D2391D003F00A1 /* MainViewController.m */; }; - 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 302D95F014D2391D003F00A1 /* MainViewController.xib */; }; - 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */; }; - 3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */; }; - 3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */; }; - 3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */; }; - 3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */; }; - 3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */; }; - 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = 3088BBBC154F3926009F9C59 /* Default~iphone.png */; }; - 308D05371370CCF300D202BF /* icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052E1370CCF300D202BF /* icon-72.png */; }; - 308D05381370CCF300D202BF /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D052F1370CCF300D202BF /* icon.png */; }; - 308D05391370CCF300D202BF /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 308D05301370CCF300D202BF /* icon@2x.png */; }; - 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */; }; - 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */; }; - 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */ = {isa = PBXBuildFile; fileRef = 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */; }; - 30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30C1856519D5FC0A00212699 /* icon-60@3x.png */; }; - 30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 30FC414816E50CA1004E6F35 /* icon-72@2x.png */; }; - 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */; }; - 7E7966DE1810823500FA85AD /* icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D41810823500FA85AD /* icon-40.png */; }; - 7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D51810823500FA85AD /* icon-40@2x.png */; }; - 7E7966E01810823500FA85AD /* icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D61810823500FA85AD /* icon-50.png */; }; - 7E7966E11810823500FA85AD /* icon-50@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D71810823500FA85AD /* icon-50@2x.png */; }; - 7E7966E21810823500FA85AD /* icon-60.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D81810823500FA85AD /* icon-60.png */; }; - 7E7966E31810823500FA85AD /* icon-60@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966D91810823500FA85AD /* icon-60@2x.png */; }; - 7E7966E41810823500FA85AD /* icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DA1810823500FA85AD /* icon-76.png */; }; - 7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DB1810823500FA85AD /* icon-76@2x.png */; }; - 7E7966E61810823500FA85AD /* icon-small.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DC1810823500FA85AD /* icon-small.png */; }; - 7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E7966DD1810823500FA85AD /* icon-small@2x.png */; }; - D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */ = {isa = PBXBuildFile; fileRef = D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */; }; - 6C75E778743C4F5CA277F5DF /* IonicKeyboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AB740C9CDB74872B20A4614 /* IonicKeyboard.m */; }; - 11EA6033F2FA495F845B1657 /* UIWebViewExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 1AD560161AD74255B8667033 /* UIWebViewExtension.m */; }; - 41BAFFE4C42D41DD968BBB78 /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = BB02E36AE3B54CC68B5024AF /* CDVLogger.m */; }; - 60B7E5E0CB244521B6DD1796 /* CDVDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 943E2FA542FB4539881F232C /* CDVDevice.m */; }; - BA9047DFE2184BAB88064B59 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = B295AC38A16E468B93376948 /* CDVNotification.m */; }; - DD4E2F77BF0F4B7E866D8B5A /* CDVNotification.bundle in Resources */ = {isa = PBXBuildFile; fileRef = A3784F401BE74727A65E95BA /* CDVNotification.bundle */; }; - 05EBE3ED6EA64212BCC52906 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 270ADA31CA7B4A42B185E451 /* AudioToolbox.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 4F159639E85C4AA6A6586124 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DB5B5B7FD894F31AEE2DE28 /* CDVLocation.m */; }; - 85552B118FDD4F9286C3D33C /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88109882DED84831BEC5BBB0 /* CoreLocation.framework */; }; - 28A1910A7DEA48DBB4EBB8FA /* CDVConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = E0B03F2F75BD419ABA4A9689 /* CDVConnection.m */; }; - 79E64CBE70114745BC7D1E61 /* CDVReachability.m in Sources */ = {isa = PBXBuildFile; fileRef = E7E73D045C374F719137889D /* CDVReachability.m */; }; - 28FA0D2F417F4E6891D4A2A3 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E63CFDA045E649E8A2E41A6E /* SystemConfiguration.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 032ABF0840BB48E0B3DD2F92 /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 73C53A36FBD446C9BB33C265 /* CDVSplashScreen.m */; }; - C2BF0352F9A246A886C16676 /* CDVViewController+SplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 58B5B2F329484022BEE14D58 /* CDVViewController+SplashScreen.m */; }; - 4A80D26AF40046D7AD4979A9 /* AppDelegate+notification.m in Sources */ = {isa = PBXBuildFile; fileRef = EE6BC93769C04564BA35B9B4 /* AppDelegate+notification.m */; }; - 4ABEABC16E324DEEB7A72E3B /* PushPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 450F6AEB11F34A6080834666 /* PushPlugin.m */; }; - 6084459294A8473FB8AA20F3 /* SocialSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D2A7B40020F4AAEBE6DCEB1 /* SocialSharing.m */; }; - 98F1852ABB5E4B118CC6C27B /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88275732925E4321970403F3 /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; - 4C059853D8B843F88F01C944 /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A186FB94DE714DEC95EA29D9 /* MessageUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 301BF534109A57CC0062928A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC07E0554694100DB518D; - remoteInfo = CordovaLib; - }; - 301BF550109A68C00062928A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC07D0554694100DB518D; - remoteInfo = CordovaLib; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1D3623240D0F684500981E51 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 1D3623250D0F684500981E51 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 1D6058910D05DD3D006BFB54 /* StoneIsland.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "StoneIsland.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1F766FDD13BBADB100FB74C0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Localizable.strings; sourceTree = ""; }; - 1F766FE013BBADB100FB74C0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = Localizable.strings; sourceTree = ""; }; - 288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = CordovaLib/CordovaLib.xcodeproj; sourceTree = ""; }; - 301BF56E109A69640062928A /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; path = www; sourceTree = SOURCE_ROOT; }; - 302D95EE14D2391D003F00A1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; - 302D95EF14D2391D003F00A1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; - 302D95F014D2391D003F00A1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainViewController.xib; sourceTree = ""; }; - 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape@2x~ipad.png"; sourceTree = ""; }; - 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape~ipad.png"; sourceTree = ""; }; - 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait@2x~ipad.png"; sourceTree = ""; }; - 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait~ipad.png"; sourceTree = ""; }; - 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x~iphone.png"; sourceTree = ""; }; - 3088BBBC154F3926009F9C59 /* Default~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default~iphone.png"; sourceTree = ""; }; - 308D052E1370CCF300D202BF /* icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72.png"; sourceTree = ""; }; - 308D052F1370CCF300D202BF /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon.png; sourceTree = ""; }; - 308D05301370CCF300D202BF /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon@2x.png"; sourceTree = ""; }; - 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h.png"; sourceTree = ""; }; - 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h.png"; sourceTree = ""; }; - 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape-736h.png"; sourceTree = ""; }; - 30C1856519D5FC0A00212699 /* icon-60@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@3x.png"; sourceTree = ""; }; - 30FC414816E50CA1004E6F35 /* icon-72@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-72@2x.png"; sourceTree = ""; }; - 32CA4F630368D1EE00C91783 /* StoneIsland-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "StoneIsland-Prefix.pch"; sourceTree = ""; }; - 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; - 7E7966D41810823500FA85AD /* icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40.png"; sourceTree = ""; }; - 7E7966D51810823500FA85AD /* icon-40@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-40@2x.png"; sourceTree = ""; }; - 7E7966D61810823500FA85AD /* icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50.png"; sourceTree = ""; }; - 7E7966D71810823500FA85AD /* icon-50@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-50@2x.png"; sourceTree = ""; }; - 7E7966D81810823500FA85AD /* icon-60.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60.png"; sourceTree = ""; }; - 7E7966D91810823500FA85AD /* icon-60@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-60@2x.png"; sourceTree = ""; }; - 7E7966DA1810823500FA85AD /* icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-76.png"; sourceTree = ""; }; - 7E7966DB1810823500FA85AD /* icon-76@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-76@2x.png"; sourceTree = ""; }; - 7E7966DC1810823500FA85AD /* icon-small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small.png"; sourceTree = ""; }; - 7E7966DD1810823500FA85AD /* icon-small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-small@2x.png"; sourceTree = ""; }; - 8D1107310486CEB800E47090 /* StoneIsland-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "StoneIsland-Info.plist"; path = "../StoneIsland-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = ""; }; - D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x~iphone.png"; sourceTree = ""; }; - EB87FDF21871DA7A0020F90C /* merges */ = {isa = PBXFileReference; lastKnownFileType = folder; name = merges; path = ../../merges; sourceTree = ""; }; - EB87FDF31871DA8E0020F90C /* www */ = {isa = PBXFileReference; lastKnownFileType = folder; name = www; path = ../../www; sourceTree = ""; }; - EB87FDF41871DAF40020F90C /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = ../../config.xml; sourceTree = ""; }; - F840E1F0165FE0F500CFE078 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = config.xml; path = "StoneIsland/config.xml"; sourceTree = ""; }; - 7AB740C9CDB74872B20A4614 /* IonicKeyboard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "IonicKeyboard.m"; path = "com.ionic.keyboard/IonicKeyboard.m"; sourceTree = ""; fileEncoding = 4; }; - 1AD560161AD74255B8667033 /* UIWebViewExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "UIWebViewExtension.m"; path = "com.ionic.keyboard/UIWebViewExtension.m"; sourceTree = ""; fileEncoding = 4; }; - CB2B6023F6FA4EDDA1B805A3 /* IonicKeyboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "IonicKeyboard.h"; path = "com.ionic.keyboard/IonicKeyboard.h"; sourceTree = ""; fileEncoding = 4; }; - 461C6746FF5D496C905BB2F4 /* UIWebViewExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "UIWebViewExtension.h"; path = "com.ionic.keyboard/UIWebViewExtension.h"; sourceTree = ""; fileEncoding = 4; }; - BB02E36AE3B54CC68B5024AF /* CDVLogger.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVLogger.m"; path = "cordova-plugin-console/CDVLogger.m"; sourceTree = ""; fileEncoding = 4; }; - C0F9083D05D14C36888043CF /* CDVLogger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVLogger.h"; path = "cordova-plugin-console/CDVLogger.h"; sourceTree = ""; fileEncoding = 4; }; - 943E2FA542FB4539881F232C /* CDVDevice.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVDevice.m"; path = "cordova-plugin-device/CDVDevice.m"; sourceTree = ""; fileEncoding = 4; }; - 21A7639E907549CFB6316B85 /* CDVDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVDevice.h"; path = "cordova-plugin-device/CDVDevice.h"; sourceTree = ""; fileEncoding = 4; }; - B295AC38A16E468B93376948 /* CDVNotification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVNotification.m"; path = "cordova-plugin-dialogs/CDVNotification.m"; sourceTree = ""; fileEncoding = 4; }; - C3742AC53E044C76B51CEE5C /* CDVNotification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVNotification.h"; path = "cordova-plugin-dialogs/CDVNotification.h"; sourceTree = ""; fileEncoding = 4; }; - A3784F401BE74727A65E95BA /* CDVNotification.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = "CDVNotification.bundle"; path = "CDVNotification.bundle"; sourceTree = ""; }; - 270ADA31CA7B4A42B185E451 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "AudioToolbox.framework"; path = "System/Library/Frameworks/AudioToolbox.framework"; sourceTree = SDKROOT; fileEncoding = 4; }; - 8DB5B5B7FD894F31AEE2DE28 /* CDVLocation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVLocation.m"; path = "cordova-plugin-geolocation/CDVLocation.m"; sourceTree = ""; fileEncoding = 4; }; - 07C6DBCD51E04D448AAF3C12 /* CDVLocation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVLocation.h"; path = "cordova-plugin-geolocation/CDVLocation.h"; sourceTree = ""; fileEncoding = 4; }; - 88109882DED84831BEC5BBB0 /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "CoreLocation.framework"; path = "System/Library/Frameworks/CoreLocation.framework"; sourceTree = SDKROOT; fileEncoding = 4; }; - E0B03F2F75BD419ABA4A9689 /* CDVConnection.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVConnection.m"; path = "cordova-plugin-network-information/CDVConnection.m"; sourceTree = ""; fileEncoding = 4; }; - E7E73D045C374F719137889D /* CDVReachability.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVReachability.m"; path = "cordova-plugin-network-information/CDVReachability.m"; sourceTree = ""; fileEncoding = 4; }; - A5AE3F6AD3E84776AEAC2BC0 /* CDVConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVConnection.h"; path = "cordova-plugin-network-information/CDVConnection.h"; sourceTree = ""; fileEncoding = 4; }; - B91BC96D7245451284AE3002 /* CDVReachability.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVReachability.h"; path = "cordova-plugin-network-information/CDVReachability.h"; sourceTree = ""; fileEncoding = 4; }; - E63CFDA045E649E8A2E41A6E /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "SystemConfiguration.framework"; path = "System/Library/Frameworks/SystemConfiguration.framework"; sourceTree = SDKROOT; fileEncoding = 4; }; - 73C53A36FBD446C9BB33C265 /* CDVSplashScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVSplashScreen.m"; path = "cordova-plugin-splashscreen/CDVSplashScreen.m"; sourceTree = ""; fileEncoding = 4; }; - 58B5B2F329484022BEE14D58 /* CDVViewController+SplashScreen.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "CDVViewController+SplashScreen.m"; path = "cordova-plugin-splashscreen/CDVViewController+SplashScreen.m"; sourceTree = ""; fileEncoding = 4; }; - 3E6B9A9492B847CD8FE87334 /* CDVSplashScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVSplashScreen.h"; path = "cordova-plugin-splashscreen/CDVSplashScreen.h"; sourceTree = ""; fileEncoding = 4; }; - AEFF8C2B3066438BB4111A39 /* CDVViewController+SplashScreen.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "CDVViewController+SplashScreen.h"; path = "cordova-plugin-splashscreen/CDVViewController+SplashScreen.h"; sourceTree = ""; fileEncoding = 4; }; - EE6BC93769C04564BA35B9B4 /* AppDelegate+notification.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "AppDelegate+notification.m"; path = "phonegap-plugin-push/AppDelegate+notification.m"; sourceTree = ""; fileEncoding = 4; }; - 450F6AEB11F34A6080834666 /* PushPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "PushPlugin.m"; path = "phonegap-plugin-push/PushPlugin.m"; sourceTree = ""; fileEncoding = 4; }; - 9F746E936D46499681DECD6E /* AppDelegate+notification.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "AppDelegate+notification.h"; path = "phonegap-plugin-push/AppDelegate+notification.h"; sourceTree = ""; fileEncoding = 4; }; - A3C287A7B1C74C02A8585FC2 /* PushPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "PushPlugin.h"; path = "phonegap-plugin-push/PushPlugin.h"; sourceTree = ""; fileEncoding = 4; }; - 0D2A7B40020F4AAEBE6DCEB1 /* SocialSharing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "SocialSharing.m"; path = "cordova-plugin-x-socialsharing/SocialSharing.m"; sourceTree = ""; fileEncoding = 4; }; - 8A80AE176DAB4F84AC8031D7 /* SocialSharing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "SocialSharing.h"; path = "cordova-plugin-x-socialsharing/SocialSharing.h"; sourceTree = ""; fileEncoding = 4; }; - 88275732925E4321970403F3 /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Social.framework"; path = "System/Library/Frameworks/Social.framework"; sourceTree = SDKROOT; fileEncoding = 4; }; - A186FB94DE714DEC95EA29D9 /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "MessageUI.framework"; path = "System/Library/Frameworks/MessageUI.framework"; sourceTree = SDKROOT; fileEncoding = 4; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1D60588F0D05DD3D006BFB54 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5B1594DD16A7569C00FEF299 /* AssetsLibrary.framework in Frameworks */, - 301BF552109A68D80062928A /* libCordova.a in Frameworks */, - 288765FD0DF74451002DB57D /* CoreGraphics.framework in Frameworks */, - 305D5FD1115AB8F900A74A75 /* MobileCoreServices.framework in Frameworks */, - 05EBE3ED6EA64212BCC52906 /* AudioToolbox.framework in Frameworks */, - 85552B118FDD4F9286C3D33C /* CoreLocation.framework in Frameworks */, - 28FA0D2F417F4E6891D4A2A3 /* SystemConfiguration.framework in Frameworks */, - 98F1852ABB5E4B118CC6C27B /* Social.framework in Frameworks */, - 4C059853D8B843F88F01C944 /* MessageUI.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 302D95EE14D2391D003F00A1 /* MainViewController.h */, - 302D95EF14D2391D003F00A1 /* MainViewController.m */, - 302D95F014D2391D003F00A1 /* MainViewController.xib */, - 1D3623240D0F684500981E51 /* AppDelegate.h */, - 1D3623250D0F684500981E51 /* AppDelegate.m */, - ); - name = Classes; - path = "StoneIsland/Classes"; - sourceTree = SOURCE_ROOT; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1D6058910D05DD3D006BFB54 /* StoneIsland.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* CustomTemplate */ = { - isa = PBXGroup; - children = ( - EB87FDF41871DAF40020F90C /* config.xml */, - EB87FDF31871DA8E0020F90C /* www */, - EB87FDF21871DA7A0020F90C /* merges */, - EB87FDF11871DA420020F90C /* Staging */, - 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */, - 080E96DDFE201D6D7F000001 /* Classes */, - 307C750510C5A3420062BCA9 /* Plugins */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = CustomTemplate; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - 32CA4F630368D1EE00C91783 /* StoneIsland-Prefix.pch */, - 29B97316FDCFA39411CA2CEA /* main.m */, - ); - name = "Other Sources"; - path = "StoneIsland"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 308D052D1370CCF300D202BF /* icons */, - 308D05311370CCF300D202BF /* splash */, - 8D1107310486CEB800E47090 /* StoneIsland-Info.plist */, - A3784F401BE74727A65E95BA /* CDVNotification.bundle */, - ); - name = Resources; - path = "StoneIsland/Resources"; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5B1594DC16A7569C00FEF299 /* AssetsLibrary.framework */, - 288765FC0DF74451002DB57D /* CoreGraphics.framework */, - 305D5FD0115AB8F900A74A75 /* MobileCoreServices.framework */, - 270ADA31CA7B4A42B185E451 /* AudioToolbox.framework */, - 88109882DED84831BEC5BBB0 /* CoreLocation.framework */, - E63CFDA045E649E8A2E41A6E /* SystemConfiguration.framework */, - 88275732925E4321970403F3 /* Social.framework */, - A186FB94DE714DEC95EA29D9 /* MessageUI.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 301BF52E109A57CC0062928A /* Products */ = { - isa = PBXGroup; - children = ( - 301BF535109A57CC0062928A /* libCordova.a */, - ); - name = Products; - sourceTree = ""; - }; - 307C750510C5A3420062BCA9 /* Plugins */ = { - isa = PBXGroup; - children = ( - 7AB740C9CDB74872B20A4614 /* IonicKeyboard.m */, - 1AD560161AD74255B8667033 /* UIWebViewExtension.m */, - CB2B6023F6FA4EDDA1B805A3 /* IonicKeyboard.h */, - 461C6746FF5D496C905BB2F4 /* UIWebViewExtension.h */, - BB02E36AE3B54CC68B5024AF /* CDVLogger.m */, - C0F9083D05D14C36888043CF /* CDVLogger.h */, - 943E2FA542FB4539881F232C /* CDVDevice.m */, - 21A7639E907549CFB6316B85 /* CDVDevice.h */, - B295AC38A16E468B93376948 /* CDVNotification.m */, - C3742AC53E044C76B51CEE5C /* CDVNotification.h */, - 8DB5B5B7FD894F31AEE2DE28 /* CDVLocation.m */, - 07C6DBCD51E04D448AAF3C12 /* CDVLocation.h */, - E0B03F2F75BD419ABA4A9689 /* CDVConnection.m */, - E7E73D045C374F719137889D /* CDVReachability.m */, - A5AE3F6AD3E84776AEAC2BC0 /* CDVConnection.h */, - B91BC96D7245451284AE3002 /* CDVReachability.h */, - 73C53A36FBD446C9BB33C265 /* CDVSplashScreen.m */, - 58B5B2F329484022BEE14D58 /* CDVViewController+SplashScreen.m */, - 3E6B9A9492B847CD8FE87334 /* CDVSplashScreen.h */, - AEFF8C2B3066438BB4111A39 /* CDVViewController+SplashScreen.h */, - EE6BC93769C04564BA35B9B4 /* AppDelegate+notification.m */, - 450F6AEB11F34A6080834666 /* PushPlugin.m */, - 9F746E936D46499681DECD6E /* AppDelegate+notification.h */, - A3C287A7B1C74C02A8585FC2 /* PushPlugin.h */, - 0D2A7B40020F4AAEBE6DCEB1 /* SocialSharing.m */, - 8A80AE176DAB4F84AC8031D7 /* SocialSharing.h */, - ); - name = Plugins; - path = "StoneIsland/Plugins"; - sourceTree = SOURCE_ROOT; - }; - 308D052D1370CCF300D202BF /* icons */ = { - isa = PBXGroup; - children = ( - 30C1856519D5FC0A00212699 /* icon-60@3x.png */, - 7E7966D41810823500FA85AD /* icon-40.png */, - 7E7966D51810823500FA85AD /* icon-40@2x.png */, - 7E7966D61810823500FA85AD /* icon-50.png */, - 7E7966D71810823500FA85AD /* icon-50@2x.png */, - 7E7966D81810823500FA85AD /* icon-60.png */, - 7E7966D91810823500FA85AD /* icon-60@2x.png */, - 7E7966DA1810823500FA85AD /* icon-76.png */, - 7E7966DB1810823500FA85AD /* icon-76@2x.png */, - 7E7966DC1810823500FA85AD /* icon-small.png */, - 7E7966DD1810823500FA85AD /* icon-small@2x.png */, - 30FC414816E50CA1004E6F35 /* icon-72@2x.png */, - 308D052E1370CCF300D202BF /* icon-72.png */, - 308D052F1370CCF300D202BF /* icon.png */, - 308D05301370CCF300D202BF /* icon@2x.png */, - ); - path = icons; - sourceTree = ""; - }; - 308D05311370CCF300D202BF /* splash */ = { - isa = PBXGroup; - children = ( - 30B4F2FD19D5E07200D9F7D8 /* Default-667h.png */, - 30B4F2FE19D5E07200D9F7D8 /* Default-736h.png */, - 30B4F2FF19D5E07200D9F7D8 /* Default-Landscape-736h.png */, - D4A0D8751607E02300AEF8BB /* Default-568h@2x~iphone.png */, - 3088BBB7154F3926009F9C59 /* Default-Landscape@2x~ipad.png */, - 3088BBB8154F3926009F9C59 /* Default-Landscape~ipad.png */, - 3088BBB9154F3926009F9C59 /* Default-Portrait@2x~ipad.png */, - 3088BBBA154F3926009F9C59 /* Default-Portrait~ipad.png */, - 3088BBBB154F3926009F9C59 /* Default@2x~iphone.png */, - 3088BBBC154F3926009F9C59 /* Default~iphone.png */, - ); - path = splash; - sourceTree = ""; - }; - EB87FDF11871DA420020F90C /* Staging */ = { - isa = PBXGroup; - children = ( - F840E1F0165FE0F500CFE078 /* config.xml */, - 301BF56E109A69640062928A /* www */, - ); - name = Staging; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1D6058900D05DD3D006BFB54 /* StoneIsland */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "StoneIsland" */; - buildPhases = ( - 304B58A110DAC018002A0835 /* Copy www directory */, - 1D60588D0D05DD3D006BFB54 /* Resources */, - 1D60588E0D05DD3D006BFB54 /* Sources */, - 1D60588F0D05DD3D006BFB54 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 301BF551109A68C00062928A /* PBXTargetDependency */, - ); - name = "StoneIsland"; - productName = "StoneIsland"; - productReference = 1D6058910D05DD3D006BFB54 /* StoneIsland.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 510; - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__CLI__" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - en, - es, - de, - se, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 301BF52E109A57CC0062928A /* Products */; - ProjectRef = 301BF52D109A57CC0062928A /* CordovaLib.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1D6058900D05DD3D006BFB54 /* StoneIsland */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 301BF535109A57CC0062928A /* libCordova.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libCordova.a; - remoteRef = 301BF534109A57CC0062928A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 1D60588D0D05DD3D006BFB54 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 7E7966E41810823500FA85AD /* icon-76.png in Resources */, - 7E7966DF1810823500FA85AD /* icon-40@2x.png in Resources */, - 308D05371370CCF300D202BF /* icon-72.png in Resources */, - 30B4F30119D5E07200D9F7D8 /* Default-736h.png in Resources */, - 308D05381370CCF300D202BF /* icon.png in Resources */, - 308D05391370CCF300D202BF /* icon@2x.png in Resources */, - 302D95F214D2391D003F00A1 /* MainViewController.xib in Resources */, - 7E7966E01810823500FA85AD /* icon-50.png in Resources */, - 7E7966E31810823500FA85AD /* icon-60@2x.png in Resources */, - 7E7966E61810823500FA85AD /* icon-small.png in Resources */, - 3088BBBD154F3926009F9C59 /* Default-Landscape@2x~ipad.png in Resources */, - 3088BBBE154F3926009F9C59 /* Default-Landscape~ipad.png in Resources */, - 3088BBBF154F3926009F9C59 /* Default-Portrait@2x~ipad.png in Resources */, - 7E7966E71810823500FA85AD /* icon-small@2x.png in Resources */, - 3088BBC0154F3926009F9C59 /* Default-Portrait~ipad.png in Resources */, - 30B4F30019D5E07200D9F7D8 /* Default-667h.png in Resources */, - 7E7966DE1810823500FA85AD /* icon-40.png in Resources */, - 3088BBC1154F3926009F9C59 /* Default@2x~iphone.png in Resources */, - 7E7966E21810823500FA85AD /* icon-60.png in Resources */, - 3088BBC2154F3926009F9C59 /* Default~iphone.png in Resources */, - D4A0D8761607E02300AEF8BB /* Default-568h@2x~iphone.png in Resources */, - 30B4F30219D5E07200D9F7D8 /* Default-Landscape-736h.png in Resources */, - 30C1856619D5FC0A00212699 /* icon-60@3x.png in Resources */, - 7E7966E11810823500FA85AD /* icon-50@2x.png in Resources */, - 7E7966E51810823500FA85AD /* icon-76@2x.png in Resources */, - 30FC414916E50CA1004E6F35 /* icon-72@2x.png in Resources */, - DD4E2F77BF0F4B7E866D8B5A /* CDVNotification.bundle in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 304B58A110DAC018002A0835 /* Copy www directory */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy www directory"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "cordova/lib/copy-www-build-step.sh"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1D60588E0D05DD3D006BFB54 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1D60589B0D05DD56006BFB54 /* main.m in Sources */, - 1D3623260D0F684500981E51 /* AppDelegate.m in Sources */, - 302D95F114D2391D003F00A1 /* MainViewController.m in Sources */, - 6C75E778743C4F5CA277F5DF /* IonicKeyboard.m in Sources */, - 11EA6033F2FA495F845B1657 /* UIWebViewExtension.m in Sources */, - 41BAFFE4C42D41DD968BBB78 /* CDVLogger.m in Sources */, - 60B7E5E0CB244521B6DD1796 /* CDVDevice.m in Sources */, - BA9047DFE2184BAB88064B59 /* CDVNotification.m in Sources */, - 4F159639E85C4AA6A6586124 /* CDVLocation.m in Sources */, - 28A1910A7DEA48DBB4EBB8FA /* CDVConnection.m in Sources */, - 79E64CBE70114745BC7D1E61 /* CDVReachability.m in Sources */, - 032ABF0840BB48E0B3DD2F92 /* CDVSplashScreen.m in Sources */, - C2BF0352F9A246A886C16676 /* CDVViewController+SplashScreen.m in Sources */, - 4A80D26AF40046D7AD4979A9 /* AppDelegate+notification.m in Sources */, - 4ABEABC16E324DEEB7A72E3B /* PushPlugin.m in Sources */, - 6084459294A8473FB8AA20F3 /* SocialSharing.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 301BF551109A68C00062928A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = CordovaLib; - targetProxy = 301BF550109A68C00062928A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1D6058940D05DD3E006BFB54 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "StoneIsland/StoneIsland-Prefix.pch"; - GCC_THUMB_SUPPORT = NO; - GCC_VERSION = ""; - INFOPLIST_FILE = "StoneIsland/StoneIsland-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ( - "-weak_framework", - CoreFoundation, - "-weak_framework", - UIKit, - "-weak_framework", - AVFoundation, - "-weak_framework", - CoreMedia, - "-weak-lSystem", - "-ObjC", - ); - PRODUCT_NAME = "StoneIsland"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1D6058950D05DD3E006BFB54 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ENABLE_OBJC_ARC = YES; - COPY_PHASE_STRIP = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "StoneIsland/StoneIsland-Prefix.pch"; - GCC_THUMB_SUPPORT = NO; - GCC_VERSION = ""; - INFOPLIST_FILE = "StoneIsland/StoneIsland-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ( - "-weak_framework", - CoreFoundation, - "-weak_framework", - UIKit, - "-weak_framework", - AVFoundation, - "-weak_framework", - CoreMedia, - "-weak-lSystem", - "-ObjC", - ); - PRODUCT_NAME = "StoneIsland"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_THUMB_SUPPORT = NO; - GCC_VERSION = ""; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", - "\"$(OBJROOT)/UninstalledProducts/include\"", - "\"$(BUILT_PRODUCTS_DIR)\"", - ); - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ( - "-weak_framework", - CoreFoundation, - "-weak_framework", - UIKit, - "-weak_framework", - AVFoundation, - "-weak_framework", - CoreMedia, - "-weak-lSystem", - "-ObjC", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = NO; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_THUMB_SUPPORT = NO; - GCC_VERSION = ""; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"", - "\"$(OBJROOT)/UninstalledProducts/include\"", - "\"$(BUILT_PRODUCTS_DIR)\"", - ); - IPHONEOS_DEPLOYMENT_TARGET = 6.0; - OTHER_LDFLAGS = ( - "-weak_framework", - CoreFoundation, - "-weak_framework", - UIKit, - "-weak_framework", - AVFoundation, - "-weak_framework", - CoreMedia, - "-weak-lSystem", - "-ObjC", - ); - SDKROOT = iphoneos; - SKIP_INSTALL = NO; - USER_HEADER_SEARCH_PATHS = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "StoneIsland" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1D6058940D05DD3E006BFB54 /* Debug */, - 1D6058950D05DD3E006BFB54 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "__CLI__" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a6..00000000 --- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout deleted file mode 100644 index 841af2bf..00000000 --- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 7E1D02F6-0F9E-4C28-9F28-2E37CB639DF0 - IDESourceControlProjectName - StoneIsland - IDESourceControlProjectOriginsDictionary - - 10B248D89F55F057EF759644D7695723C40D8B27 - github.com:okfocus/stone-island.git - - IDESourceControlProjectPath - StoneIsland/platforms/ios/StoneIsland.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 10B248D89F55F057EF759644D7695723C40D8B27 - ../../../../.. - - IDESourceControlProjectURL - github.com:okfocus/stone-island.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 10B248D89F55F057EF759644D7695723C40D8B27 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 10B248D89F55F057EF759644D7695723C40D8B27 - IDESourceControlWCCName - stone-island - - - - diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index a8bb4a28..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/StoneIsland.xcscheme b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/StoneIsland.xcscheme deleted file mode 100644 index a3634c57..00000000 --- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/StoneIsland.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index fa8991e2..00000000 --- a/StoneIsland/platforms/ios/StoneIsland.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - StoneIsland.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 1D6058900D05DD3D006BFB54 - - primary - - - - - diff --git a/StoneIsland/platforms/ios/StoneIsland/.gitignore b/StoneIsland/platforms/ios/StoneIsland/.gitignore deleted file mode 100644 index cc76483f..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -*.mode1v3 -*.perspectivev3 -*.pbxuser -.DS_Store -build/ diff --git a/StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.h b/StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.h deleted file mode 100644 index 2587ce10..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -// -// AppDelegate.h -// HelloCordova -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import - -#import - -@interface AppDelegate : NSObject {} - -// invoke string is passed to your app on launch, this is only valid if you -// edit HelloCordova-Info.plist to add a protocol -// a simple tutorial can be found here : -// http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html - -@property (nonatomic, strong) IBOutlet UIWindow* window; -@property (nonatomic, strong) IBOutlet CDVViewController* viewController; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.m b/StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.m deleted file mode 100644 index 79e57538..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Classes/AppDelegate.m +++ /dev/null @@ -1,151 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -// -// AppDelegate.m -// HelloCordova -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "AppDelegate.h" -#import "MainViewController.h" - -#import - -@implementation AppDelegate - -@synthesize window, viewController; - -- (id)init -{ - /** If you need to do any extra app-specific initialization, you can do it here - * -jm - **/ - NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; - - [cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; - - int cacheSizeMemory = 8 * 1024 * 1024; // 8MB - int cacheSizeDisk = 32 * 1024 * 1024; // 32MB -#if __has_feature(objc_arc) - NSURLCache* sharedCache = [[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"]; -#else - NSURLCache* sharedCache = [[[NSURLCache alloc] initWithMemoryCapacity:cacheSizeMemory diskCapacity:cacheSizeDisk diskPath:@"nsurlcache"] autorelease]; -#endif - [NSURLCache setSharedURLCache:sharedCache]; - - self = [super init]; - return self; -} - -#pragma mark UIApplicationDelegate implementation - -/** - * This is main kick off after the app inits, the views and Settings are setup here. (preferred - iOS4 and up) - */ -- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions -{ - CGRect screenBounds = [[UIScreen mainScreen] bounds]; - -#if __has_feature(objc_arc) - self.window = [[UIWindow alloc] initWithFrame:screenBounds]; -#else - self.window = [[[UIWindow alloc] initWithFrame:screenBounds] autorelease]; -#endif - self.window.autoresizesSubviews = YES; - -#if __has_feature(objc_arc) - self.viewController = [[MainViewController alloc] init]; -#else - self.viewController = [[[MainViewController alloc] init] autorelease]; -#endif - - // Set your app's start page by setting the tag in config.xml. - // If necessary, uncomment the line below to override it. - // self.viewController.startPage = @"index.html"; - - // NOTE: To customize the view's frame size (which defaults to full screen), override - // [self.viewController viewWillAppear:] in your view controller. - - self.window.rootViewController = self.viewController; - [self.window makeKeyAndVisible]; - - return YES; -} - -// this happens while we are running ( in the background, or from within our own app ) -// only valid if HelloCordova-Info.plist specifies a protocol to handle -- (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation -{ - if (!url) { - return NO; - } - - // all plugins will get the notification, and their handlers will be called - [[NSNotificationCenter defaultCenter] postNotification:[NSNotification notificationWithName:CDVPluginHandleOpenURLNotification object:url]]; - - return YES; -} - -// repost all remote and local notification using the default NSNotificationCenter so multiple plugins may respond -- (void) application:(UIApplication*)application - didReceiveLocalNotification:(UILocalNotification*)notification -{ - // re-post ( broadcast ) - [[NSNotificationCenter defaultCenter] postNotificationName:CDVLocalNotification object:notification]; -} - -#ifndef DISABLE_PUSH_NOTIFICATIONS - - - (void) application:(UIApplication*)application - didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken - { - // re-post ( broadcast ) - NSString* token = [[[[deviceToken description] - stringByReplacingOccurrencesOfString:@"<" withString:@""] - stringByReplacingOccurrencesOfString:@">" withString:@""] - stringByReplacingOccurrencesOfString:@" " withString:@""]; - - [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotification object:token]; - } - - - (void) application:(UIApplication*)application - didFailToRegisterForRemoteNotificationsWithError:(NSError*)error - { - // re-post ( broadcast ) - [[NSNotificationCenter defaultCenter] postNotificationName:CDVRemoteNotificationError object:error]; - } -#endif - -- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window -{ - // iPhone doesn't support upside down by default, while the iPad does. Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected). - NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown); - - return supportedInterfaceOrientations; -} - -- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application -{ - [[NSURLCache sharedURLCache] removeAllCachedResponses]; -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.h b/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.h deleted file mode 100644 index e17e798a..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -// -// MainViewController.h -// HelloCordova -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import -#import -#import - -@interface MainViewController : CDVViewController - -@end - -@interface MainCommandDelegate : CDVCommandDelegateImpl -@end - -@interface MainCommandQueue : CDVCommandQueue -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.m b/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.m deleted file mode 100644 index 2fe5fc4b..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.m +++ /dev/null @@ -1,164 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -// -// MainViewController.h -// HelloCordova -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import "MainViewController.h" - -@implementation MainViewController - -- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil -{ - self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; - if (self) { - // Uncomment to override the CDVCommandDelegateImpl used - // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self]; - // Uncomment to override the CDVCommandQueue used - // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self]; - } - return self; -} - -- (id)init -{ - self = [super init]; - if (self) { - // Uncomment to override the CDVCommandDelegateImpl used - // _commandDelegate = [[MainCommandDelegate alloc] initWithViewController:self]; - // Uncomment to override the CDVCommandQueue used - // _commandQueue = [[MainCommandQueue alloc] initWithViewController:self]; - } - return self; -} - -- (void)didReceiveMemoryWarning -{ - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -#pragma mark View lifecycle - -- (void)viewWillAppear:(BOOL)animated -{ - // View defaults to full size. If you want to customize the view's size, or its subviews (e.g. webView), - // you can do so here. - - [super viewWillAppear:animated]; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view from its nib. -} - -- (void)viewDidUnload -{ - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation -{ - // Return YES for supported orientations - return [super shouldAutorotateToInterfaceOrientation:interfaceOrientation]; -} - -/* Comment out the block below to over-ride */ - -/* -- (UIWebView*) newCordovaViewWithFrame:(CGRect)bounds -{ - return[super newCordovaViewWithFrame:bounds]; -} -*/ - -#pragma mark UIWebDelegate implementation - -- (void)webViewDidFinishLoad:(UIWebView*)theWebView -{ - // Black base color for background matches the native apps - theWebView.backgroundColor = [UIColor blackColor]; - - return [super webViewDidFinishLoad:theWebView]; -} - -/* Comment out the block below to over-ride */ - -/* - -- (void) webViewDidStartLoad:(UIWebView*)theWebView -{ - return [super webViewDidStartLoad:theWebView]; -} - -- (void) webView:(UIWebView*)theWebView didFailLoadWithError:(NSError*)error -{ - return [super webView:theWebView didFailLoadWithError:error]; -} - -- (BOOL) webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType -{ - return [super webView:theWebView shouldStartLoadWithRequest:request navigationType:navigationType]; -} -*/ - -@end - -@implementation MainCommandDelegate - -/* To override the methods, uncomment the line in the init function(s) - in MainViewController.m - */ - -#pragma mark CDVCommandDelegate implementation - -- (id)getCommandInstance:(NSString*)className -{ - return [super getCommandInstance:className]; -} - -- (NSString*)pathForResource:(NSString*)resourcepath -{ - return [super pathForResource:resourcepath]; -} - -@end - -@implementation MainCommandQueue - -/* To override, uncomment the line in the init function(s) - in MainViewController.m - */ -- (BOOL)execute:(CDVInvokedUrlCommand*)command -{ - return [super execute:command]; -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.xib b/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.xib deleted file mode 100644 index e45d65c6..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Classes/MainViewController.xib +++ /dev/null @@ -1,138 +0,0 @@ - - - - - 1280 - 11C25 - 1919 - 1138.11 - 566.00 - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 916 - - - IBProxyObject - IBUIView - - - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - PluginDependencyRecalculationVersion - - - - - IBFilesOwner - IBCocoaTouchFramework - - - IBFirstResponder - IBCocoaTouchFramework - - - - 274 - {{0, 20}, {320, 460}} - - - - 3 - MQA - - 2 - - - - IBCocoaTouchFramework - - - - - - - view - - - - 3 - - - - - - 0 - - - - - - 1 - - - - - -1 - - - File's Owner - - - -2 - - - - - - - MainViewController - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - UIResponder - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - com.apple.InterfaceBuilder.IBCocoaTouchPlugin - - - - - - 3 - - - - - MainViewController - UIViewController - - IBProjectSource - ./Classes/MainViewController.h - - - - - 0 - IBCocoaTouchFramework - YES - 3 - 916 - - diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/README b/StoneIsland/platforms/ios/StoneIsland/Plugins/README deleted file mode 100644 index 87df09f2..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/README +++ /dev/null @@ -1,20 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -Put the .h and .m files of your plugin here. The .js files of your plugin belong in the www folder. diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.h deleted file mode 100644 index b54f430d..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.h +++ /dev/null @@ -1,13 +0,0 @@ -#import - -@interface IonicKeyboard : CDVPlugin { - @protected - id _keyboardShowObserver, _keyboardHideObserver; -} - -@property (readwrite, assign) BOOL hideKeyboardAccessoryBar; -@property (readwrite, assign) BOOL disableScroll; -//@property (readwrite, assign) BOOL styleDark; - -@end - diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.m deleted file mode 100644 index 045cc65f..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/IonicKeyboard.m +++ /dev/null @@ -1,160 +0,0 @@ -#import "IonicKeyboard.h" -#import "UIWebViewExtension.h" -#import - -@implementation IonicKeyboard - -@synthesize hideKeyboardAccessoryBar = _hideKeyboardAccessoryBar; -@synthesize disableScroll = _disableScroll; -//@synthesize styleDark = _styleDark; - -- (void)pluginInitialize { - - NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; - __weak IonicKeyboard* weakSelf = self; - - //set defaults - self.hideKeyboardAccessoryBar = NO; - self.disableScroll = NO; - //self.styleDark = NO; - - _keyboardShowObserver = [nc addObserverForName:UIKeyboardWillShowNotification - object:nil - queue:[NSOperationQueue mainQueue] - usingBlock:^(NSNotification* notification) { - - CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; - keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil]; - - [weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.plugins.Keyboard.isVisible = true; cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]]; - - //deprecated - [weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]]; - }]; - - _keyboardHideObserver = [nc addObserverForName:UIKeyboardWillHideNotification - object:nil - queue:[NSOperationQueue mainQueue] - usingBlock:^(NSNotification* notification) { - [weakSelf.commandDelegate evalJs:@"cordova.plugins.Keyboard.isVisible = false; cordova.fireWindowEvent('native.keyboardhide'); "]; - - //deprecated - [weakSelf.commandDelegate evalJs:@"cordova.fireWindowEvent('native.hidekeyboard'); "]; - }]; -} -- (BOOL)disableScroll { - return _disableScroll; -} - -- (void)setDisableScroll:(BOOL)disableScroll { - if (disableScroll == _disableScroll) { - return; - } - if (disableScroll) { - self.webView.scrollView.scrollEnabled = NO; - self.webView.scrollView.delegate = self; - } - else { - self.webView.scrollView.scrollEnabled = YES; - self.webView.scrollView.delegate = nil; - } - - _disableScroll = disableScroll; -} - - -- (BOOL)hideKeyboardAccessoryBar { - return _hideKeyboardAccessoryBar; -} - -- (void)setHideKeyboardAccessoryBar:(BOOL)hideKeyboardAccessoryBar { - if (hideKeyboardAccessoryBar == _hideKeyboardAccessoryBar) { - return; - } - if (hideKeyboardAccessoryBar) { - self.webView.hackishlyHidesInputAccessoryView = YES; - } - else { - self.webView.hackishlyHidesInputAccessoryView = NO; - } - - _hideKeyboardAccessoryBar = hideKeyboardAccessoryBar; -} - -/* -- (BOOL)styleDark { - return _styleDark; -} - -- (void)setStyleDark:(BOOL)styleDark { - if (styleDark == _styleDark) { - return; - } - if (styleDark) { - self.webView.styleDark = YES; - } - else { - self.webView.styleDark = NO; - } - - _styleDark = styleDark; -} -*/ - - -/* ------------------------------------------------------------- */ - -- (void)scrollViewDidScroll:(UIScrollView *)scrollView { - [scrollView setContentOffset: CGPointZero]; -} - -/* ------------------------------------------------------------- */ - -- (void)dealloc { - NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; - - [nc removeObserver:self name:UIKeyboardWillShowNotification object:nil]; - [nc removeObserver:self name:UIKeyboardWillHideNotification object:nil]; -} - -/* ------------------------------------------------------------- */ - -- (void) disableScroll:(CDVInvokedUrlCommand*)command { - if (!command.arguments || ![command.arguments count]){ - return; - } - id value = [command.arguments objectAtIndex:0]; - - self.disableScroll = [value boolValue]; -} - -- (void) hideKeyboardAccessoryBar:(CDVInvokedUrlCommand*)command { - if (!command.arguments || ![command.arguments count]){ - return; - } - id value = [command.arguments objectAtIndex:0]; - - self.hideKeyboardAccessoryBar = [value boolValue]; -} - -- (void) close:(CDVInvokedUrlCommand*)command { - [self.webView endEditing:YES]; -} - -- (void) show:(CDVInvokedUrlCommand*)command { - NSLog(@"Showing keyboard not supported in iOS due to platform limitations."); -} - -/* -- (void) styleDark:(CDVInvokedUrlCommand*)command { - if (!command.arguments || ![command.arguments count]){ - return; - } - id value = [command.arguments objectAtIndex:0]; - - self.styleDark = [value boolValue]; -} -*/ - -@end - diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.h deleted file mode 100644 index 1d6c293d..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.h +++ /dev/null @@ -1,4 +0,0 @@ -@interface UIWebView (HackishAccessoryHiding) -@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView; -//@property (nonatomic, assign) BOOL styleDark; -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.m deleted file mode 100644 index 25403e6f..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/com.ionic.keyboard/UIWebViewExtension.m +++ /dev/null @@ -1,109 +0,0 @@ -#import -#import -#import "UIWebViewExtension.h" - -//Credit: https://gist.github.com/bjhomer/2048571 -//Also: http://stackoverflow.com/a/23398487/1091751 -@implementation UIWebView (HackishAccessoryHiding) - -static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView"; -static Class hackishFixClass = Nil; - -- (UIView *)hackishlyFoundBrowserView { - UIScrollView *scrollView = self.scrollView; - - UIView *browserView = nil; - for (UIView *subview in scrollView.subviews) { - if ([NSStringFromClass([subview class]) hasPrefix:@"UIWebBrowserView"]) { - browserView = subview; - break; - } - } - return browserView; -} - -- (id)methodReturningNil { - return nil; -} - -- (void)ensureHackishSubclassExistsOfBrowserViewClass:(Class)browserViewClass { - if (!hackishFixClass) { - Class newClass = objc_allocateClassPair(browserViewClass, hackishFixClassName, 0); - IMP nilImp = [self methodForSelector:@selector(methodReturningNil)]; - class_addMethod(newClass, @selector(inputAccessoryView), nilImp, "@@:"); - objc_registerClassPair(newClass); - - hackishFixClass = newClass; - } -} - -- (BOOL) hackishlyHidesInputAccessoryView { - UIView *browserView = [self hackishlyFoundBrowserView]; - return [browserView class] == hackishFixClass; -} - -- (void) setHackishlyHidesInputAccessoryView:(BOOL)value { - UIView *browserView = [self hackishlyFoundBrowserView]; - if (browserView == nil) { - return; - } - [self ensureHackishSubclassExistsOfBrowserViewClass:[browserView class]]; - - if (value) { - object_setClass(browserView, hackishFixClass); - } - else { - Class normalClass = objc_getClass("UIWebBrowserView"); - object_setClass(browserView, normalClass); - } - [browserView reloadInputViews]; -} -/* ---------------------------------------------------------------- */ - -/* -- (UIKeyboardAppearance) darkKeyboardAppearanceTemplateMethod { - return UIKeyboardAppearanceDark; -} - -- (UIKeyboardAppearance) lightKeyboardAppearanceTemplateMethod { - return UIKeyboardAppearanceLight; -} - -- (BOOL) styleDark { - UIView *browserView = [self hackishlyFoundBrowserView]; - if (browserView == nil) { - return false; - } - - Method m = class_getInstanceMethod( [self class], @selector( darkKeyboardAppearanceTemplateMethod ) ); - IMP imp = method_getImplementation( m ); - - Method m2 = class_getInstanceMethod( [browserView class], @selector(keyboardAppearance) ); - IMP imp2 = method_getImplementation( m2 ); - - return imp == imp2; -} - -- (void) setStyleDark:(BOOL)styleDark { - UIView *browserView = [self hackishlyFoundBrowserView]; - if (browserView == nil) { - return; - } - - if ( styleDark ) { - Method m = class_getInstanceMethod( [self class], @selector( darkKeyboardAppearanceTemplateMethod ) ); - IMP imp = method_getImplementation( m ); - const char* typeEncoding = method_getTypeEncoding( m ); - class_replaceMethod( [browserView class], @selector(keyboardAppearance), imp, typeEncoding ); - } - else { - Method m = class_getInstanceMethod( [self class], @selector( lightKeyboardAppearanceTemplateMethod ) ); - IMP imp = method_getImplementation( m ); - const char* typeEncoding = method_getTypeEncoding( m ); - class_replaceMethod( [browserView class], @selector(keyboardAppearance), imp, typeEncoding ); - } -} -*/ - -@end - diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.h deleted file mode 100644 index 7cfb3063..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import - -@interface CDVLogger : CDVPlugin - -- (void)logLevel:(CDVInvokedUrlCommand*)command; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.m deleted file mode 100644 index ccfa3a51..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-console/CDVLogger.m +++ /dev/null @@ -1,38 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVLogger.h" -#import - -@implementation CDVLogger - -/* log a message */ -- (void)logLevel:(CDVInvokedUrlCommand*)command -{ - id level = [command argumentAtIndex:0]; - id message = [command argumentAtIndex:1]; - - if ([level isEqualToString:@"LOG"]) { - NSLog(@"%@", message); - } else { - NSLog(@"%@: %@", level, message); - } -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.h deleted file mode 100644 index a146d882..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.h +++ /dev/null @@ -1,30 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import - -@interface CDVDevice : CDVPlugin -{} - -+ (NSString*)cordovaVersion; - -- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.m deleted file mode 100644 index 5a3f4708..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-device/CDVDevice.m +++ /dev/null @@ -1,99 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#include -#include - -#import -#import "CDVDevice.h" - -@implementation UIDevice (ModelVersion) - -- (NSString*)modelVersion -{ - size_t size; - - sysctlbyname("hw.machine", NULL, &size, NULL, 0); - char* machine = malloc(size); - sysctlbyname("hw.machine", machine, &size, NULL, 0); - NSString* platform = [NSString stringWithUTF8String:machine]; - free(machine); - - return platform; -} - -@end - -@interface CDVDevice () {} -@end - -@implementation CDVDevice - -- (NSString*)uniqueAppInstanceIdentifier:(UIDevice*)device -{ - NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; - static NSString* UUID_KEY = @"CDVUUID"; - - NSString* app_uuid = [userDefaults stringForKey:UUID_KEY]; - - if (app_uuid == nil) { - CFUUIDRef uuidRef = CFUUIDCreate(kCFAllocatorDefault); - CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef); - - app_uuid = [NSString stringWithString:(__bridge NSString*)uuidString]; - [userDefaults setObject:app_uuid forKey:UUID_KEY]; - [userDefaults synchronize]; - - CFRelease(uuidString); - CFRelease(uuidRef); - } - - return app_uuid; -} - -- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command -{ - NSDictionary* deviceProperties = [self deviceProperties]; - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; - - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - -- (NSDictionary*)deviceProperties -{ - UIDevice* device = [UIDevice currentDevice]; - NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4]; - - [devProps setObject:@"Apple" forKey:@"manufacturer"]; - [devProps setObject:[device modelVersion] forKey:@"model"]; - [devProps setObject:@"iOS" forKey:@"platform"]; - [devProps setObject:[device systemVersion] forKey:@"version"]; - [devProps setObject:[self uniqueAppInstanceIdentifier:device] forKey:@"uuid"]; - [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"]; - - NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps]; - return devReturn; -} - -+ (NSString*)cordovaVersion -{ - return CDV_VERSION; -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.h deleted file mode 100644 index 9253f6a9..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import -#import -#import - -@interface CDVNotification : CDVPlugin {} - -- (void)alert:(CDVInvokedUrlCommand*)command; -- (void)confirm:(CDVInvokedUrlCommand*)command; -- (void)prompt:(CDVInvokedUrlCommand*)command; -- (void)beep:(CDVInvokedUrlCommand*)command; - -@end - -@interface CDVAlertView : UIAlertView {} -@property (nonatomic, copy) NSString* callbackId; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.m deleted file mode 100644 index 1581ad3c..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-dialogs/CDVNotification.m +++ /dev/null @@ -1,221 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVNotification.h" - -#define DIALOG_TYPE_ALERT @"alert" -#define DIALOG_TYPE_PROMPT @"prompt" - -static void soundCompletionCallback(SystemSoundID ssid, void* data); - -@implementation CDVNotification - -/* - * showDialogWithMessage - Common method to instantiate the alert view for alert, confirm, and prompt notifications. - * Parameters: - * message The alert view message. - * title The alert view title. - * buttons The array of customized strings for the buttons. - * defaultText The input text for the textbox (if textbox exists). - * callbackId The commmand callback id. - * dialogType The type of alert view [alert | prompt]. - */ -- (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:(NSArray*)buttons defaultText:(NSString*)defaultText callbackId:(NSString*)callbackId dialogType:(NSString*)dialogType -{ - - NSUInteger count = [buttons count]; -#ifdef __IPHONE_8_0 - if (NSClassFromString(@"UIAlertController")) { - - UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - - if ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.3) { - - CGRect alertFrame = [UIScreen mainScreen].applicationFrame; - - if (UIInterfaceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])) { - // swap the values for the app frame since it is now in landscape - CGFloat temp = alertFrame.size.width; - alertFrame.size.width = alertFrame.size.height; - alertFrame.size.height = temp; - } - - alertController.view.frame = alertFrame; - } - - for (int n = 0; n < count; n++) { - - UIAlertAction* action = [UIAlertAction actionWithTitle:[buttons objectAtIndex:n] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) - { - CDVPluginResult* result; - - if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { - - NSString* value0 = [[alertController.textFields objectAtIndex:0] text]; - NSDictionary* info = @{ - @"buttonIndex":@(n + 1), - @"input1":(value0 ? value0 : [NSNull null]) - }; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; - - } else { - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(n + 1)]; - - } - - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - - }]; - [alertController addAction:action]; - - } - - if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { - - [alertController addTextFieldWithConfigurationHandler:^(UITextField *textField) { - textField.text = defaultText; - }]; - } - - - - [self.viewController presentViewController:alertController animated:YES completion:nil]; - - } else { -#endif - CDVAlertView* alertView = [[CDVAlertView alloc] - initWithTitle:title - message:message - delegate:self - cancelButtonTitle:nil - otherButtonTitles:nil]; - - alertView.callbackId = callbackId; - - - - for (int n = 0; n < count; n++) { - [alertView addButtonWithTitle:[buttons objectAtIndex:n]]; - } - - if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) { - alertView.alertViewStyle = UIAlertViewStylePlainTextInput; - UITextField* textField = [alertView textFieldAtIndex:0]; - textField.text = defaultText; - } - - [alertView show]; -#ifdef __IPHONE_8_0 - } -#endif - -} - -- (void)alert:(CDVInvokedUrlCommand*)command -{ - NSString* callbackId = command.callbackId; - NSString* message = [command argumentAtIndex:0]; - NSString* title = [command argumentAtIndex:1]; - NSString* buttons = [command argumentAtIndex:2]; - - [self showDialogWithMessage:message title:title buttons:@[buttons] defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT]; -} - -- (void)confirm:(CDVInvokedUrlCommand*)command -{ - NSString* callbackId = command.callbackId; - NSString* message = [command argumentAtIndex:0]; - NSString* title = [command argumentAtIndex:1]; - NSArray* buttons = [command argumentAtIndex:2]; - - [self showDialogWithMessage:message title:title buttons:buttons defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT]; -} - -- (void)prompt:(CDVInvokedUrlCommand*)command -{ - NSString* callbackId = command.callbackId; - NSString* message = [command argumentAtIndex:0]; - NSString* title = [command argumentAtIndex:1]; - NSArray* buttons = [command argumentAtIndex:2]; - NSString* defaultText = [command argumentAtIndex:3]; - - [self showDialogWithMessage:message title:title buttons:buttons defaultText:defaultText callbackId:callbackId dialogType:DIALOG_TYPE_PROMPT]; -} - -/** - * Callback invoked when an alert dialog's buttons are clicked. - */ -- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex -{ - CDVAlertView* cdvAlertView = (CDVAlertView*)alertView; - CDVPluginResult* result; - - // Determine what gets returned to JS based on the alert view type. - if (alertView.alertViewStyle == UIAlertViewStyleDefault) { - // For alert and confirm, return button index as int back to JS. - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(buttonIndex + 1)]; - } else { - // For prompt, return button index and input text back to JS. - NSString* value0 = [[alertView textFieldAtIndex:0] text]; - NSDictionary* info = @{ - @"buttonIndex":@(buttonIndex + 1), - @"input1":(value0 ? value0 : [NSNull null]) - }; - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info]; - } - [self.commandDelegate sendPluginResult:result callbackId:cdvAlertView.callbackId]; -} - -static void playBeep(int count) { - SystemSoundID completeSound; - NSInteger cbDataCount = count; - NSURL* audioPath = [[NSBundle mainBundle] URLForResource:@"CDVNotification.bundle/beep" withExtension:@"wav"]; - #if __has_feature(objc_arc) - AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound); - #else - AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound); - #endif - AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(cbDataCount-1)); - AudioServicesPlaySystemSound(completeSound); -} - -static void soundCompletionCallback(SystemSoundID ssid, void* data) { - int count = (int)data; - AudioServicesRemoveSystemSoundCompletion (ssid); - AudioServicesDisposeSystemSoundID(ssid); - if (count > 0) { - playBeep(count); - } -} - -- (void)beep:(CDVInvokedUrlCommand*)command -{ - NSNumber* count = [command argumentAtIndex:0 withDefault:[NSNumber numberWithInt:1]]; - playBeep([count intValue]); -} - - -@end - -@implementation CDVAlertView - -@synthesize callbackId; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.h deleted file mode 100644 index cce2738f..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import -#import - -enum CDVLocationStatus { - PERMISSIONDENIED = 1, - POSITIONUNAVAILABLE, - TIMEOUT -}; -typedef NSUInteger CDVLocationStatus; - -// simple object to keep track of location information -@interface CDVLocationData : NSObject { - CDVLocationStatus locationStatus; - NSMutableArray* locationCallbacks; - NSMutableDictionary* watchCallbacks; - CLLocation* locationInfo; -} - -@property (nonatomic, assign) CDVLocationStatus locationStatus; -@property (nonatomic, strong) CLLocation* locationInfo; -@property (nonatomic, strong) NSMutableArray* locationCallbacks; -@property (nonatomic, strong) NSMutableDictionary* watchCallbacks; - -@end - -@interface CDVLocation : CDVPlugin { - @private BOOL __locationStarted; - @private BOOL __highAccuracyEnabled; - CDVLocationData* locationData; -} - -@property (nonatomic, strong) CLLocationManager* locationManager; -@property (nonatomic, strong) CDVLocationData* locationData; - -- (void)getLocation:(CDVInvokedUrlCommand*)command; -- (void)addWatch:(CDVInvokedUrlCommand*)command; -- (void)clearWatch:(CDVInvokedUrlCommand*)command; -- (void)returnLocationInfo:(NSString*)callbackId andKeepCallback:(BOOL)keepCallback; -- (void)returnLocationError:(NSUInteger)errorCode withMessage:(NSString*)message; -- (void)startLocation:(BOOL)enableHighAccuracy; - -- (void)locationManager:(CLLocationManager*)manager - didUpdateToLocation:(CLLocation*)newLocation - fromLocation:(CLLocation*)oldLocation; - -- (void)locationManager:(CLLocationManager*)manager - didFailWithError:(NSError*)error; - -- (BOOL)isLocationServicesEnabled; -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.m deleted file mode 100644 index 8b543c8e..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-geolocation/CDVLocation.m +++ /dev/null @@ -1,366 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVLocation.h" - -#pragma mark Constants - -#define kPGLocationErrorDomain @"kPGLocationErrorDomain" -#define kPGLocationDesiredAccuracyKey @"desiredAccuracy" -#define kPGLocationForcePromptKey @"forcePrompt" -#define kPGLocationDistanceFilterKey @"distanceFilter" -#define kPGLocationFrequencyKey @"frequency" - -#pragma mark - -#pragma mark Categories - -@implementation CDVLocationData - -@synthesize locationStatus, locationInfo, locationCallbacks, watchCallbacks; -- (CDVLocationData*)init -{ - self = (CDVLocationData*)[super init]; - if (self) { - self.locationInfo = nil; - self.locationCallbacks = nil; - self.watchCallbacks = nil; - } - return self; -} - -@end - -#pragma mark - -#pragma mark CDVLocation - -@implementation CDVLocation - -@synthesize locationManager, locationData; - -- (void)pluginInitialize -{ - self.locationManager = [[CLLocationManager alloc] init]; - self.locationManager.delegate = self; // Tells the location manager to send updates to this object - __locationStarted = NO; - __highAccuracyEnabled = NO; - self.locationData = nil; -} - -- (BOOL)isAuthorized -{ - BOOL authorizationStatusClassPropertyAvailable = [CLLocationManager respondsToSelector:@selector(authorizationStatus)]; // iOS 4.2+ - - if (authorizationStatusClassPropertyAvailable) { - NSUInteger authStatus = [CLLocationManager authorizationStatus]; -#ifdef __IPHONE_8_0 - if ([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { //iOS 8.0+ - return (authStatus == kCLAuthorizationStatusAuthorizedWhenInUse) || (authStatus == kCLAuthorizationStatusAuthorizedAlways) || (authStatus == kCLAuthorizationStatusNotDetermined); - } -#endif - return (authStatus == kCLAuthorizationStatusAuthorized) || (authStatus == kCLAuthorizationStatusNotDetermined); - } - - // by default, assume YES (for iOS < 4.2) - return YES; -} - -- (BOOL)isLocationServicesEnabled -{ - BOOL locationServicesEnabledInstancePropertyAvailable = [self.locationManager respondsToSelector:@selector(locationServicesEnabled)]; // iOS 3.x - BOOL locationServicesEnabledClassPropertyAvailable = [CLLocationManager respondsToSelector:@selector(locationServicesEnabled)]; // iOS 4.x - - if (locationServicesEnabledClassPropertyAvailable) { // iOS 4.x - return [CLLocationManager locationServicesEnabled]; - } else if (locationServicesEnabledInstancePropertyAvailable) { // iOS 2.x, iOS 3.x - return [(id)self.locationManager locationServicesEnabled]; - } else { - return NO; - } -} - -- (void)startLocation:(BOOL)enableHighAccuracy -{ - if (![self isLocationServicesEnabled]) { - [self returnLocationError:PERMISSIONDENIED withMessage:@"Location services are not enabled."]; - return; - } - if (![self isAuthorized]) { - NSString* message = nil; - BOOL authStatusAvailable = [CLLocationManager respondsToSelector:@selector(authorizationStatus)]; // iOS 4.2+ - if (authStatusAvailable) { - NSUInteger code = [CLLocationManager authorizationStatus]; - if (code == kCLAuthorizationStatusNotDetermined) { - // could return POSITION_UNAVAILABLE but need to coordinate with other platforms - message = @"User undecided on application's use of location services."; - } else if (code == kCLAuthorizationStatusRestricted) { - message = @"Application's use of location services is restricted."; - } - } - // PERMISSIONDENIED is only PositionError that makes sense when authorization denied - [self returnLocationError:PERMISSIONDENIED withMessage:message]; - - return; - } - -#ifdef __IPHONE_8_0 - NSUInteger code = [CLLocationManager authorizationStatus]; - if (code == kCLAuthorizationStatusNotDetermined && ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)] || [self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)])) { //iOS8+ - __highAccuracyEnabled = enableHighAccuracy; - if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]){ - [self.locationManager requestAlwaysAuthorization]; - } else if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]) { - [self.locationManager requestWhenInUseAuthorization]; - } else { - NSLog(@"[Warning] No NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription key is defined in the Info.plist file."); - } - return; - } -#endif - - // Tell the location manager to start notifying us of location updates. We - // first stop, and then start the updating to ensure we get at least one - // update, even if our location did not change. - [self.locationManager stopUpdatingLocation]; - [self.locationManager startUpdatingLocation]; - __locationStarted = YES; - if (enableHighAccuracy) { - __highAccuracyEnabled = YES; - // Set distance filter to 5 for a high accuracy. Setting it to "kCLDistanceFilterNone" could provide a - // higher accuracy, but it's also just spamming the callback with useless reports which drain the battery. - self.locationManager.distanceFilter = 5; - // Set desired accuracy to Best. - self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; - } else { - __highAccuracyEnabled = NO; - // TODO: Set distance filter to 10 meters? and desired accuracy to nearest ten meters? arbitrary. - self.locationManager.distanceFilter = 10; - self.locationManager.desiredAccuracy = kCLLocationAccuracyNearestTenMeters; - } -} - -- (void)_stopLocation -{ - if (__locationStarted) { - if (![self isLocationServicesEnabled]) { - return; - } - - [self.locationManager stopUpdatingLocation]; - __locationStarted = NO; - __highAccuracyEnabled = NO; - } -} - -- (void)locationManager:(CLLocationManager*)manager - didUpdateToLocation:(CLLocation*)newLocation - fromLocation:(CLLocation*)oldLocation -{ - CDVLocationData* cData = self.locationData; - - cData.locationInfo = newLocation; - if (self.locationData.locationCallbacks.count > 0) { - for (NSString* callbackId in self.locationData.locationCallbacks) { - [self returnLocationInfo:callbackId andKeepCallback:NO]; - } - - [self.locationData.locationCallbacks removeAllObjects]; - } - if (self.locationData.watchCallbacks.count > 0) { - for (NSString* timerId in self.locationData.watchCallbacks) { - [self returnLocationInfo:[self.locationData.watchCallbacks objectForKey:timerId] andKeepCallback:YES]; - } - } else { - // No callbacks waiting on us anymore, turn off listening. - [self _stopLocation]; - } -} - -- (void)getLocation:(CDVInvokedUrlCommand*)command -{ - NSString* callbackId = command.callbackId; - BOOL enableHighAccuracy = [[command argumentAtIndex:0] boolValue]; - - if ([self isLocationServicesEnabled] == NO) { - NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2]; - [posError setObject:[NSNumber numberWithInt:PERMISSIONDENIED] forKey:@"code"]; - [posError setObject:@"Location services are disabled." forKey:@"message"]; - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]; - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - } else { - if (!self.locationData) { - self.locationData = [[CDVLocationData alloc] init]; - } - CDVLocationData* lData = self.locationData; - if (!lData.locationCallbacks) { - lData.locationCallbacks = [NSMutableArray arrayWithCapacity:1]; - } - - if (!__locationStarted || (__highAccuracyEnabled != enableHighAccuracy)) { - // add the callbackId into the array so we can call back when get data - if (callbackId != nil) { - [lData.locationCallbacks addObject:callbackId]; - } - // Tell the location manager to start notifying us of heading updates - [self startLocation:enableHighAccuracy]; - } else { - [self returnLocationInfo:callbackId andKeepCallback:NO]; - } - } -} - -- (void)addWatch:(CDVInvokedUrlCommand*)command -{ - NSString* callbackId = command.callbackId; - NSString* timerId = [command argumentAtIndex:0]; - BOOL enableHighAccuracy = [[command argumentAtIndex:1] boolValue]; - - if (!self.locationData) { - self.locationData = [[CDVLocationData alloc] init]; - } - CDVLocationData* lData = self.locationData; - - if (!lData.watchCallbacks) { - lData.watchCallbacks = [NSMutableDictionary dictionaryWithCapacity:1]; - } - - // add the callbackId into the dictionary so we can call back whenever get data - [lData.watchCallbacks setObject:callbackId forKey:timerId]; - - if ([self isLocationServicesEnabled] == NO) { - NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2]; - [posError setObject:[NSNumber numberWithInt:PERMISSIONDENIED] forKey:@"code"]; - [posError setObject:@"Location services are disabled." forKey:@"message"]; - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]; - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - } else { - if (!__locationStarted || (__highAccuracyEnabled != enableHighAccuracy)) { - // Tell the location manager to start notifying us of location updates - [self startLocation:enableHighAccuracy]; - } - } -} - -- (void)clearWatch:(CDVInvokedUrlCommand*)command -{ - NSString* timerId = [command argumentAtIndex:0]; - - if (self.locationData && self.locationData.watchCallbacks && [self.locationData.watchCallbacks objectForKey:timerId]) { - [self.locationData.watchCallbacks removeObjectForKey:timerId]; - if([self.locationData.watchCallbacks count] == 0) { - [self _stopLocation]; - } - } -} - -- (void)stopLocation:(CDVInvokedUrlCommand*)command -{ - [self _stopLocation]; -} - -- (void)returnLocationInfo:(NSString*)callbackId andKeepCallback:(BOOL)keepCallback -{ - CDVPluginResult* result = nil; - CDVLocationData* lData = self.locationData; - - if (lData && !lData.locationInfo) { - // return error - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:POSITIONUNAVAILABLE]; - } else if (lData && lData.locationInfo) { - CLLocation* lInfo = lData.locationInfo; - NSMutableDictionary* returnInfo = [NSMutableDictionary dictionaryWithCapacity:8]; - NSNumber* timestamp = [NSNumber numberWithDouble:([lInfo.timestamp timeIntervalSince1970] * 1000)]; - [returnInfo setObject:timestamp forKey:@"timestamp"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.speed] forKey:@"velocity"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.verticalAccuracy] forKey:@"altitudeAccuracy"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.horizontalAccuracy] forKey:@"accuracy"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.course] forKey:@"heading"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.altitude] forKey:@"altitude"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.coordinate.latitude] forKey:@"latitude"]; - [returnInfo setObject:[NSNumber numberWithDouble:lInfo.coordinate.longitude] forKey:@"longitude"]; - - result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:returnInfo]; - [result setKeepCallbackAsBool:keepCallback]; - } - if (result) { - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - } -} - -- (void)returnLocationError:(NSUInteger)errorCode withMessage:(NSString*)message -{ - NSMutableDictionary* posError = [NSMutableDictionary dictionaryWithCapacity:2]; - - [posError setObject:[NSNumber numberWithUnsignedInteger:errorCode] forKey:@"code"]; - [posError setObject:message ? message:@"" forKey:@"message"]; - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:posError]; - - for (NSString* callbackId in self.locationData.locationCallbacks) { - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - } - - [self.locationData.locationCallbacks removeAllObjects]; - - for (NSString* callbackId in self.locationData.watchCallbacks) { - [self.commandDelegate sendPluginResult:result callbackId:callbackId]; - } -} - -- (void)locationManager:(CLLocationManager*)manager didFailWithError:(NSError*)error -{ - NSLog(@"locationManager::didFailWithError %@", [error localizedFailureReason]); - - CDVLocationData* lData = self.locationData; - if (lData && __locationStarted) { - // TODO: probably have to once over the various error codes and return one of: - // PositionError.PERMISSION_DENIED = 1; - // PositionError.POSITION_UNAVAILABLE = 2; - // PositionError.TIMEOUT = 3; - NSUInteger positionError = POSITIONUNAVAILABLE; - if (error.code == kCLErrorDenied) { - positionError = PERMISSIONDENIED; - } - [self returnLocationError:positionError withMessage:[error localizedDescription]]; - } - - if (error.code != kCLErrorLocationUnknown) { - [self.locationManager stopUpdatingLocation]; - __locationStarted = NO; - } -} - -//iOS8+ --(void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status -{ - if(!__locationStarted){ - [self startLocation:__highAccuracyEnabled]; - } -} - -- (void)dealloc -{ - self.locationManager.delegate = nil; -} - -- (void)onReset -{ - [self _stopLocation]; - [self.locationManager stopUpdatingHeading]; -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.h deleted file mode 100644 index 8add0279..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import -#import "CDVReachability.h" - -@interface CDVConnection : CDVPlugin { - NSString* type; - NSString* _callbackId; - - CDVReachability* internetReach; -} - -@property (copy) NSString* connectionType; -@property (strong) CDVReachability* internetReach; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.m deleted file mode 100644 index 37497675..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVConnection.m +++ /dev/null @@ -1,127 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVConnection.h" -#import "CDVReachability.h" - -@interface CDVConnection (PrivateMethods) -- (void)updateOnlineStatus; -- (void)sendPluginResult; -@end - -@implementation CDVConnection - -@synthesize connectionType, internetReach; - -- (void)getConnectionInfo:(CDVInvokedUrlCommand*)command -{ - _callbackId = command.callbackId; - [self sendPluginResult]; -} - -- (void)sendPluginResult -{ - CDVPluginResult* result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:self.connectionType]; - - [result setKeepCallbackAsBool:YES]; - [self.commandDelegate sendPluginResult:result callbackId:_callbackId]; -} - -- (NSString*)w3cConnectionTypeFor:(CDVReachability*)reachability -{ - NetworkStatus networkStatus = [reachability currentReachabilityStatus]; - - switch (networkStatus) { - case NotReachable: - return @"none"; - - case ReachableViaWWAN: - { - BOOL isConnectionRequired = [reachability connectionRequired]; - if (isConnectionRequired) { - return @"none"; - } else { - return @"cellular"; - } - } - case ReachableViaWiFi: - return @"wifi"; - - default: - return @"unknown"; - } -} - -- (BOOL)isCellularConnection:(NSString*)theConnectionType -{ - return [theConnectionType isEqualToString:@"2g"] || - [theConnectionType isEqualToString:@"3g"] || - [theConnectionType isEqualToString:@"4g"] || - [theConnectionType isEqualToString:@"cellular"]; -} - -- (void)updateReachability:(CDVReachability*)reachability -{ - if (reachability) { - // check whether the connection type has changed - NSString* newConnectionType = [self w3cConnectionTypeFor:reachability]; - if ([newConnectionType isEqualToString:self.connectionType]) { // the same as before, remove dupes - return; - } else { - self.connectionType = [self w3cConnectionTypeFor:reachability]; - } - } - [self sendPluginResult]; -} - -- (void)updateConnectionType:(NSNotification*)note -{ - CDVReachability* curReach = [note object]; - - if ((curReach != nil) && [curReach isKindOfClass:[CDVReachability class]]) { - [self updateReachability:curReach]; - } -} - -- (void)onPause -{ - [self.internetReach stopNotifier]; -} - -- (void)onResume -{ - [self.internetReach startNotifier]; - [self updateReachability:self.internetReach]; -} - -- (void)pluginInitialize -{ - self.connectionType = @"none"; - self.internetReach = [CDVReachability reachabilityForInternetConnection]; - self.connectionType = [self w3cConnectionTypeFor:self.internetReach]; - [self.internetReach startNotifier]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateConnectionType:) - name:kReachabilityChangedNotification object:nil]; - if (&UIApplicationDidEnterBackgroundNotification && &UIApplicationWillEnterForegroundNotification) { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onPause) name:UIApplicationDidEnterBackgroundNotification object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onResume) name:UIApplicationWillEnterForegroundNotification object:nil]; - } -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.h deleted file mode 100644 index 01a95c35..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - - File: Reachability.h - Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs. - Version: 2.2 - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under - Apple's copyrights in this original Apple software (the "Apple Software"), to - use, reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions - of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. may be used - to endorse or promote products derived from the Apple Software without specific - prior written permission from Apple. Except as expressly stated in this notice, - no other rights or licenses, express or implied, are granted by Apple herein, - including but not limited to any patent rights that may be infringed by your - derivative works or by other works in which the Apple Software may be - incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR - DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF - CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF - APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2010 Apple Inc. All Rights Reserved. - -*/ - -#import -#import -#import - -typedef enum { - NotReachable = 0, - ReachableViaWWAN, // this value has been swapped with ReachableViaWiFi for Cordova backwards compat. reasons - ReachableViaWiFi // this value has been swapped with ReachableViaWWAN for Cordova backwards compat. reasons -} NetworkStatus; -#define kReachabilityChangedNotification @"kNetworkReachabilityChangedNotification" - -@interface CDVReachability : NSObject -{ - BOOL localWiFiRef; - SCNetworkReachabilityRef reachabilityRef; -} - -// reachabilityWithHostName- Use to check the reachability of a particular host name. -+ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName; - -// reachabilityWithAddress- Use to check the reachability of a particular IP address. -+ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; - -// reachabilityForInternetConnection- checks whether the default route is available. -// Should be used by applications that do not connect to a particular host -+ (CDVReachability*)reachabilityForInternetConnection; - -// reachabilityForLocalWiFi- checks whether a local wifi connection is available. -+ (CDVReachability*)reachabilityForLocalWiFi; - -// Start listening for reachability notifications on the current run loop -- (BOOL)startNotifier; -- (void)stopNotifier; - -- (NetworkStatus)currentReachabilityStatus; -// WWAN may be available, but not active until a connection has been established. -// WiFi may require a connection for VPN on Demand. -- (BOOL)connectionRequired; -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.m deleted file mode 100644 index c60261ae..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-network-information/CDVReachability.m +++ /dev/null @@ -1,260 +0,0 @@ -/* - - File: Reachability.m - Abstract: Basic demonstration of how to use the SystemConfiguration Reachability APIs. - Version: 2.2 - - Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. - ("Apple") in consideration of your agreement to the following terms, and your - use, installation, modification or redistribution of this Apple software - constitutes acceptance of these terms. If you do not agree with these terms, - please do not use, install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and subject - to these terms, Apple grants you a personal, non-exclusive license, under - Apple's copyrights in this original Apple software (the "Apple Software"), to - use, reproduce, modify and redistribute the Apple Software, with or without - modifications, in source and/or binary forms; provided that if you redistribute - the Apple Software in its entirety and without modifications, you must retain - this notice and the following text and disclaimers in all such redistributions - of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. may be used - to endorse or promote products derived from the Apple Software without specific - prior written permission from Apple. Except as expressly stated in this notice, - no other rights or licenses, express or implied, are granted by Apple herein, - including but not limited to any patent rights that may be infringed by your - derivative works or by other works in which the Apple Software may be - incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO - WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED - WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN - COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR - DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF - CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF - APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2010 Apple Inc. All Rights Reserved. - -*/ - -#import -#import -#import -#import -#import -#import - -#import - -#import "CDVReachability.h" - -#define kShouldPrintReachabilityFlags 0 - -static void CDVPrintReachabilityFlags(SCNetworkReachabilityFlags flags, const char* comment) -{ -#if kShouldPrintReachabilityFlags - NSLog(@"Reachability Flag Status: %c%c %c%c%c%c%c%c%c %s\n", - (flags & kSCNetworkReachabilityFlagsIsWWAN) ? 'W' : '-', - (flags & kSCNetworkReachabilityFlagsReachable) ? 'R' : '-', - - (flags & kSCNetworkReachabilityFlagsTransientConnection) ? 't' : '-', - (flags & kSCNetworkReachabilityFlagsConnectionRequired) ? 'c' : '-', - (flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) ? 'C' : '-', - (flags & kSCNetworkReachabilityFlagsInterventionRequired) ? 'i' : '-', - (flags & kSCNetworkReachabilityFlagsConnectionOnDemand) ? 'D' : '-', - (flags & kSCNetworkReachabilityFlagsIsLocalAddress) ? 'l' : '-', - (flags & kSCNetworkReachabilityFlagsIsDirect) ? 'd' : '-', - comment - ); -#endif -} - -@implementation CDVReachability - -static void CDVReachabilityCallback(SCNetworkReachabilityRef target, SCNetworkReachabilityFlags flags, void* info) -{ -#pragma unused (target, flags) - // NSCAssert(info != NULL, @"info was NULL in ReachabilityCallback"); - // NSCAssert([(NSObject*) info isKindOfClass: [Reachability class]], @"info was wrong class in ReachabilityCallback"); - - // Converted the asserts above to conditionals, with safe return from the function - if (info == NULL) { - NSLog(@"info was NULL in ReachabilityCallback"); - return; - } - - if (![(__bridge NSObject*)info isKindOfClass :[CDVReachability class]]) { - NSLog(@"info was wrong class in ReachabilityCallback"); - return; - } - - // We're on the main RunLoop, so an NSAutoreleasePool is not necessary, but is added defensively - // in case someon uses the Reachability object in a different thread. - @autoreleasepool { - CDVReachability* noteObject = (__bridge CDVReachability*)info; - // Post a notification to notify the client that the network reachability changed. - [[NSNotificationCenter defaultCenter] postNotificationName:kReachabilityChangedNotification object:noteObject]; - } -} - -- (BOOL)startNotifier -{ - BOOL retVal = NO; - SCNetworkReachabilityContext context = {0, (__bridge void*)(self), NULL, NULL, NULL}; - - if (SCNetworkReachabilitySetCallback(reachabilityRef, CDVReachabilityCallback, &context)) { - if (SCNetworkReachabilityScheduleWithRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode)) { - retVal = YES; - } - } - return retVal; -} - -- (void)stopNotifier -{ - if (reachabilityRef != NULL) { - SCNetworkReachabilityUnscheduleFromRunLoop(reachabilityRef, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); - } -} - -- (void)dealloc -{ - [self stopNotifier]; - if (reachabilityRef != NULL) { - CFRelease(reachabilityRef); - } -} - -+ (CDVReachability*)reachabilityWithHostName:(NSString*)hostName; -{ - CDVReachability* retVal = NULL; - SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, [hostName UTF8String]); - if (reachability != NULL) { - retVal = [[self alloc] init]; - if (retVal != NULL) { - retVal->reachabilityRef = reachability; - retVal->localWiFiRef = NO; - } - } - return retVal; -} - -+ (CDVReachability*)reachabilityWithAddress:(const struct sockaddr_in*)hostAddress; -{ - SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr*)hostAddress); - CDVReachability* retVal = NULL; - if (reachability != NULL) { - retVal = [[self alloc] init]; - if (retVal != NULL) { - retVal->reachabilityRef = reachability; - retVal->localWiFiRef = NO; - } - } - return retVal; -} - -+ (CDVReachability*)reachabilityForInternetConnection; -{ - struct sockaddr_in zeroAddress; - bzero(&zeroAddress, sizeof(zeroAddress)); - zeroAddress.sin_len = sizeof(zeroAddress); - zeroAddress.sin_family = AF_INET; - return [self reachabilityWithAddress:&zeroAddress]; -} - -+ (CDVReachability*)reachabilityForLocalWiFi; -{ - struct sockaddr_in localWifiAddress; - bzero(&localWifiAddress, sizeof(localWifiAddress)); - localWifiAddress.sin_len = sizeof(localWifiAddress); - localWifiAddress.sin_family = AF_INET; - // IN_LINKLOCALNETNUM is defined in as 169.254.0.0 - localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); - CDVReachability* retVal = [self reachabilityWithAddress:&localWifiAddress]; - if (retVal != NULL) { - retVal->localWiFiRef = YES; - } - return retVal; -} - -#pragma mark Network Flag Handling - -- (NetworkStatus)localWiFiStatusForFlags:(SCNetworkReachabilityFlags)flags -{ - CDVPrintReachabilityFlags(flags, "localWiFiStatusForFlags"); - - BOOL retVal = NotReachable; - if ((flags & kSCNetworkReachabilityFlagsReachable) && (flags & kSCNetworkReachabilityFlagsIsDirect)) { - retVal = ReachableViaWiFi; - } - return retVal; -} - -- (NetworkStatus)networkStatusForFlags:(SCNetworkReachabilityFlags)flags -{ - CDVPrintReachabilityFlags(flags, "networkStatusForFlags"); - if ((flags & kSCNetworkReachabilityFlagsReachable) == 0) { - // if target host is not reachable - return NotReachable; - } - - NetworkStatus retVal = NotReachable; - - if ((flags & kSCNetworkReachabilityFlagsConnectionRequired) == 0) { - // if target host is reachable and no connection is required - // then we'll assume (for now) that your on Wi-Fi - retVal = ReachableViaWiFi; - } - - if ((((flags & kSCNetworkReachabilityFlagsConnectionOnDemand) != 0) || - ((flags & kSCNetworkReachabilityFlagsConnectionOnTraffic) != 0))) { - // ... and the connection is on-demand (or on-traffic) if the - // calling application is using the CFSocketStream or higher APIs - - if ((flags & kSCNetworkReachabilityFlagsInterventionRequired) == 0) { - // ... and no [user] intervention is needed - retVal = ReachableViaWiFi; - } - } - - if ((flags & kSCNetworkReachabilityFlagsIsWWAN) == kSCNetworkReachabilityFlagsIsWWAN) { - // ... but WWAN connections are OK if the calling application - // is using the CFNetwork (CFSocketStream?) APIs. - retVal = ReachableViaWWAN; - } - return retVal; -} - -- (BOOL)connectionRequired; -{ - NSAssert(reachabilityRef != NULL, @"connectionRequired called with NULL reachabilityRef"); - SCNetworkReachabilityFlags flags; - if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { - return flags & kSCNetworkReachabilityFlagsConnectionRequired; - } - return NO; -} - -- (NetworkStatus)currentReachabilityStatus -{ - NSAssert(reachabilityRef != NULL, @"currentNetworkStatus called with NULL reachabilityRef"); - NetworkStatus retVal = NotReachable; - SCNetworkReachabilityFlags flags; - if (SCNetworkReachabilityGetFlags(reachabilityRef, &flags)) { - if (localWiFiRef) { - retVal = [self localWiFiStatusForFlags:flags]; - } else { - retVal = [self networkStatusForFlags:flags]; - } - } - return retVal; -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h deleted file mode 100644 index 0d6ae397..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import -#import - -typedef struct { - BOOL iPhone; - BOOL iPad; - BOOL iPhone5; - BOOL iPhone6; - BOOL iPhone6Plus; - BOOL retina; - -} CDV_iOSDevice; - -@interface CDVSplashScreen : CDVPlugin { - UIActivityIndicatorView* _activityView; - UIImageView* _imageView; - NSString* _curImageName; - BOOL _visible; -} - -- (void)show:(CDVInvokedUrlCommand*)command; -- (void)hide:(CDVInvokedUrlCommand*)command; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m deleted file mode 100644 index 43b356ad..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVSplashScreen.m +++ /dev/null @@ -1,330 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVSplashScreen.h" -#import -#import -#import "CDVViewController+SplashScreen.h" - -#define kSplashScreenDurationDefault 0.25f - - -@implementation CDVSplashScreen - -- (void)pluginInitialize -{ - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad) name:CDVPageDidLoadNotification object:self.webView]; - - [self setVisible:YES]; -} - -- (void)show:(CDVInvokedUrlCommand*)command -{ - [self setVisible:YES]; -} - -- (void)hide:(CDVInvokedUrlCommand*)command -{ - [self setVisible:NO]; -} - -- (void)pageDidLoad -{ - id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]]; - - // if value is missing, default to yes - if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) { - [self setVisible:NO]; - } -} - -- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context -{ - [self updateImage]; -} - -- (void)createViews -{ - /* - * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style. - * - * whiteLarge = UIActivityIndicatorViewStyleWhiteLarge - * white = UIActivityIndicatorViewStyleWhite - * gray = UIActivityIndicatorViewStyleGray - * - */ - - // Determine whether rotation should be enabled for this device - // Per iOS HIG, landscape is only supported on iPad and iPhone 6+ - CDV_iOSDevice device = [self getCurrentDevice]; - BOOL autorotateValue = (device.iPad || device.iPhone6Plus) ? - [(CDVViewController *)self.viewController shouldAutorotateDefaultValue] : - NO; - - [(CDVViewController *)self.viewController setEnabledAutorotation:autorotateValue]; - - NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]]; - UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; - - if ([topActivityIndicator isEqualToString:@"whiteLarge"]) { - topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge; - } else if ([topActivityIndicator isEqualToString:@"white"]) { - topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite; - } else if ([topActivityIndicator isEqualToString:@"gray"]) { - topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray; - } - - UIView* parentView = self.viewController.view; - parentView.userInteractionEnabled = NO; // disable user interaction while splashscreen is shown - _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle]; - _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2); - _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin - | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin; - [_activityView startAnimating]; - - // Set the frame & image later. - _imageView = [[UIImageView alloc] init]; - [parentView addSubview:_imageView]; - - id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:[@"ShowSplashScreenSpinner" lowercaseString]]; - // backwards compatibility - if key is missing, default to true - if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue]) { - [parentView addSubview:_activityView]; - } - - // Frame is required when launching in portrait mode. - // Bounds for landscape since it captures the rotation. - [parentView addObserver:self forKeyPath:@"frame" options:0 context:nil]; - [parentView addObserver:self forKeyPath:@"bounds" options:0 context:nil]; - - [self updateImage]; -} - -- (void)destroyViews -{ - [(CDVViewController *)self.viewController setEnabledAutorotation:[(CDVViewController *)self.viewController shouldAutorotateDefaultValue]]; - - [_imageView removeFromSuperview]; - [_activityView removeFromSuperview]; - _imageView = nil; - _activityView = nil; - _curImageName = nil; - - self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion - [self.viewController.view removeObserver:self forKeyPath:@"frame"]; - [self.viewController.view removeObserver:self forKeyPath:@"bounds"]; -} - -- (CDV_iOSDevice) getCurrentDevice -{ - CDV_iOSDevice device; - - UIScreen* mainScreen = [UIScreen mainScreen]; - CGFloat mainScreenHeight = mainScreen.bounds.size.height; - CGFloat mainScreenWidth = mainScreen.bounds.size.width; - - int limit = MAX(mainScreenHeight,mainScreenWidth); - - device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad); - device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone); - device.retina = ([mainScreen scale] == 2.0); - device.iPhone5 = (device.iPhone && limit == 568.0); - // note these below is not a true device detect, for example if you are on an - // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but - // this is appropriate for detecting the runtime screen environment - device.iPhone6 = (device.iPhone && limit == 667.0); - device.iPhone6Plus = (device.iPhone && limit == 736.0); - - return device; -} - -- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device -{ - // Use UILaunchImageFile if specified in plist. Otherwise, use Default. - NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"]; - - NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations]; - - // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape - BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape); - BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown); - // this means there are no mixed orientations in there - BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape); - - if (imageName) { - imageName = [imageName stringByDeletingPathExtension]; - } else { - imageName = @"Default"; - } - - if (device.iPhone5) { // does not support landscape - imageName = [imageName stringByAppendingString:@"-568h"]; - } else if (device.iPhone6) { // does not support landscape - imageName = [imageName stringByAppendingString:@"-667h"]; - } else if (device.iPhone6Plus) { // supports landscape - if (isOrientationLocked) { - imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")]; - } else { - switch (currentOrientation) { - case UIInterfaceOrientationLandscapeLeft: - case UIInterfaceOrientationLandscapeRight: - imageName = [imageName stringByAppendingString:@"-Landscape"]; - break; - default: - break; - } - } - imageName = [imageName stringByAppendingString:@"-736h"]; - - } else if (device.iPad) { // supports landscape - if (isOrientationLocked) { - imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")]; - } else { - switch (currentOrientation) { - case UIInterfaceOrientationLandscapeLeft: - case UIInterfaceOrientationLandscapeRight: - imageName = [imageName stringByAppendingString:@"-Landscape"]; - break; - - case UIInterfaceOrientationPortrait: - case UIInterfaceOrientationPortraitUpsideDown: - default: - imageName = [imageName stringByAppendingString:@"-Portrait"]; - break; - } - } - } - - return imageName; -} - -// Sets the view's frame and image. -- (void)updateImage -{ - NSString* imageName = [self getImageName:[[UIApplication sharedApplication] statusBarOrientation] delegate:(id)self.viewController device:[self getCurrentDevice]]; - - if (![imageName isEqualToString:_curImageName]) { - UIImage* img = [UIImage imageNamed:imageName]; - _imageView.image = img; - _curImageName = imageName; - } - - // Check that splash screen's image exists before updating bounds - if (_imageView.image) { - [self updateBounds]; - } else { - NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName); - } -} - -- (void)updateBounds -{ - UIImage* img = _imageView.image; - CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero; - - CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size; - UIInterfaceOrientation orientation = self.viewController.interfaceOrientation; - CGAffineTransform imgTransform = CGAffineTransformIdentity; - - /* If and only if an iPhone application is landscape-only as per - * UISupportedInterfaceOrientations, the view controller's orientation is - * landscape. In this case the image must be rotated in order to appear - * correctly. - */ - BOOL isIPad = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad; - if (UIInterfaceOrientationIsLandscape(orientation) && !isIPad) { - imgTransform = CGAffineTransformMakeRotation(M_PI / 2); - imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width); - } - - // There's a special case when the image is the size of the screen. - if (CGSizeEqualToSize(screenSize, imgBounds.size)) { - CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil]; - if (!(IsAtLeastiOSVersion(@"7.0"))) { - imgBounds.origin.y -= statusFrame.size.height; - } - } else if (imgBounds.size.width > 0) { - CGRect viewBounds = self.viewController.view.bounds; - CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height; - CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height; - // This matches the behaviour of the native splash screen. - CGFloat ratio; - if (viewAspect > imgAspect) { - ratio = viewBounds.size.width / imgBounds.size.width; - } else { - ratio = viewBounds.size.height / imgBounds.size.height; - } - imgBounds.size.height *= ratio; - imgBounds.size.width *= ratio; - } - - _imageView.transform = imgTransform; - _imageView.frame = imgBounds; -} - -- (void)setVisible:(BOOL)visible -{ - if (visible == _visible) { - return; - } - _visible = visible; - - id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]]; - id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]]; - - float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault : [fadeSplashScreenDuration floatValue]; - - if ((fadeSplashScreenValue == nil) || ![fadeSplashScreenValue boolValue]) { - fadeDuration = 0; - } - - // Never animate the showing of the splash screen. - if (visible) { - if (_imageView == nil) { - [self createViews]; - } - } else if (fadeDuration == 0) { - [self destroyViews]; - } else { - __weak __typeof(self) weakSelf = self; - - [UIView transitionWithView:self.viewController.view - duration:fadeDuration - options:UIViewAnimationOptionTransitionNone - animations:^(void) { - __typeof(self) strongSelf = weakSelf; - if (strongSelf != nil) { - dispatch_async(dispatch_get_main_queue(), ^{ - [strongSelf->_activityView setAlpha:0]; - [strongSelf->_imageView setAlpha:0]; - }); - } - } - completion:^(BOOL finished) { - if (finished) { - dispatch_async(dispatch_get_main_queue(), ^{ - [weakSelf destroyViews]; - }); - } - } - ]; - } -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h deleted file mode 100644 index a948ea31..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import - -@interface CDVViewController (SplashScreen) - -@property (nonatomic, assign) BOOL enabledAutorotation; -@property (nonatomic, readonly) BOOL shouldAutorotateDefaultValue; - - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m deleted file mode 100644 index 5736b6f2..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-splashscreen/CDVViewController+SplashScreen.m +++ /dev/null @@ -1,82 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ - -#import "CDVViewController+SplashScreen.h" -#import - -@implementation CDVViewController (SplashScreen) - -@dynamic enabledAutorotation; - -- (void)setEnabledAutorotation:(BOOL)value -{ - objc_setAssociatedObject(self, - @selector(enabledAutorotation), - [NSNumber numberWithBool:value], - OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -- (BOOL)enabledAutorotation -{ - NSNumber *number = (NSNumber *)objc_getAssociatedObject(self, @selector(enabledAutorotation)); - return [number boolValue]; -} - -+ (void)load -{ - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - Class class = [self class]; - - SEL originalSelector = @selector(shouldAutorotate); - SEL swizzledSelector = @selector(splash_shouldAutorotate); - - Method originalMethod = class_getInstanceMethod(class, originalSelector); - Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector); - - BOOL didAddMethod = class_addMethod(class, - originalSelector, - method_getImplementation(swizzledMethod), - method_getTypeEncoding(swizzledMethod)); - - if (didAddMethod) { - class_replaceMethod(class, - swizzledSelector, - method_getImplementation(originalMethod), - method_getTypeEncoding(originalMethod)); - } else { - method_exchangeImplementations(originalMethod, swizzledMethod); - } - }); -} - -#pragma mark - Method Swizzling - -- (BOOL)splash_shouldAutorotate -{ - return self.enabledAutorotation; -} - - -- (BOOL)shouldAutorotateDefaultValue -{ - return [self splash_shouldAutorotate]; -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h deleted file mode 100755 index b51474d3..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h +++ /dev/null @@ -1,27 +0,0 @@ -#import -#import - -@interface SocialSharing : CDVPlugin - -@property (nonatomic, strong) MFMailComposeViewController *globalMailComposer; -@property (retain) UIDocumentInteractionController * documentInteractionController; -@property (retain) NSString * tempStoredFile; -@property (retain) CDVInvokedUrlCommand * command; - -- (void)available:(CDVInvokedUrlCommand*)command; -- (void)setIPadPopupCoordinates:(CDVInvokedUrlCommand*)command; -- (void)share:(CDVInvokedUrlCommand*)command; -- (void)canShareVia:(CDVInvokedUrlCommand*)command; -- (void)canShareViaEmail:(CDVInvokedUrlCommand*)command; -- (void)shareVia:(CDVInvokedUrlCommand*)command; -- (void)shareViaTwitter:(CDVInvokedUrlCommand*)command; -- (void)shareViaFacebook:(CDVInvokedUrlCommand*)command; -- (void)shareViaFacebookWithPasteMessageHint:(CDVInvokedUrlCommand*)command; -- (void)shareViaWhatsApp:(CDVInvokedUrlCommand*)command; -- (void)shareViaSMS:(CDVInvokedUrlCommand*)command; -- (void)shareViaEmail:(CDVInvokedUrlCommand*)command; -- (void)shareViaInstagram:(CDVInvokedUrlCommand*)command; - -- (void)saveToPhotoAlbum:(CDVInvokedUrlCommand*)command; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m deleted file mode 100755 index cd0913a4..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m +++ /dev/null @@ -1,715 +0,0 @@ -#import "SocialSharing.h" -#import -#import -#import -#import -#import -#import - -@implementation SocialSharing { - UIPopoverController *_popover; - NSString *_popupCoordinates; -} - -- (void)pluginInitialize { - if ([self isEmailAvailable]) { - [self cycleTheGlobalMailComposer]; - } -} - -- (void)available:(CDVInvokedUrlCommand*)command { - BOOL avail = NO; - if (NSClassFromString(@"UIActivityViewController")) { - avail = YES; - } - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:avail]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - -- (NSString*)getIPadPopupCoordinates { - if (_popupCoordinates != nil) { - return _popupCoordinates; - } - if ([self.webView respondsToSelector:@selector(stringByEvaluatingJavaScriptFromString:)]) { - return [(UIWebView*)self.webView stringByEvaluatingJavaScriptFromString:@"window.plugins.socialsharing.iPadPopupCoordinates();"]; - } else { - // prolly a wkwebview, ignoring for now - return nil; - } -} - -- (void)setIPadPopupCoordinates:(CDVInvokedUrlCommand*)command { - _popupCoordinates = [command.arguments objectAtIndex:0]; -} - -- (CGRect)getPopupRectFromIPadPopupCoordinates:(NSArray*)comps { - CGRect rect = CGRectZero; - if ([comps count] == 4) { - rect = CGRectMake([[comps objectAtIndex:0] integerValue], [[comps objectAtIndex:1] integerValue], [[comps objectAtIndex:2] integerValue], [[comps objectAtIndex:3] integerValue]); - } - return rect; -} - -- (void)share:(CDVInvokedUrlCommand*)command { - [self.commandDelegate runInBackground:^{ //avoid main thread block especially if sharing big files from url - if (!NSClassFromString(@"UIActivityViewController")) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - return; - } - - NSString *message = [command.arguments objectAtIndex:0]; - NSString *subject = [command.arguments objectAtIndex:1]; - NSArray *filenames = [command.arguments objectAtIndex:2]; - NSString *urlString = [command.arguments objectAtIndex:3]; - - NSMutableArray *activityItems = [[NSMutableArray alloc] init]; - [activityItems addObject:message]; - - NSMutableArray *files = [[NSMutableArray alloc] init]; - if (filenames != (id)[NSNull null] && filenames.count > 0) { - for (NSString* filename in filenames) { - NSObject *file = [self getImage:filename]; - if (file == nil) { - file = [self getFile:filename]; - } - if (file != nil) { - [files addObject:file]; - } - } - [activityItems addObjectsFromArray:files]; - } - - if (urlString != (id)[NSNull null]) { - [activityItems addObject:[NSURL URLWithString:urlString]]; - } - - UIActivity *activity = [[UIActivity alloc] init]; - NSArray *applicationActivities = [[NSArray alloc] initWithObjects:activity, nil]; - UIActivityViewController *activityVC = [[UIActivityViewController alloc] initWithActivityItems:activityItems applicationActivities:applicationActivities]; - if (subject != (id)[NSNull null]) { - [activityVC setValue:subject forKey:@"subject"]; - } - - // TODO deprecated in iOS 8.0, change this some day - [activityVC setCompletionHandler:^(NSString *activityType, BOOL completed) { - [self cleanupStoredFiles]; - NSLog(@"SocialSharing app selected: %@", activityType); - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:completed]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; - - NSArray * socialSharingExcludeActivities = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"SocialSharingExcludeActivities"]; - if (socialSharingExcludeActivities!=nil && [socialSharingExcludeActivities count] > 0) { - activityVC.excludedActivityTypes = socialSharingExcludeActivities; - } - - dispatch_async(dispatch_get_main_queue(), ^(void){ - // iPad on iOS >= 8 needs a different approach - if ([UIDevice currentDevice].userInterfaceIdiom == UIUserInterfaceIdiomPad) { - NSString* iPadCoords = [self getIPadPopupCoordinates]; - if (iPadCoords != nil && ![iPadCoords isEqual:@"-1,-1,-1,-1"]) { - NSArray *comps = [iPadCoords componentsSeparatedByString:@","]; - CGRect rect = [self getPopupRectFromIPadPopupCoordinates:comps]; - if ([activityVC respondsToSelector:@selector(popoverPresentationController)]) { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 // iOS 8.0 supported - activityVC.popoverPresentationController.sourceView = self.webView; - activityVC.popoverPresentationController.sourceRect = rect; -#endif - } else { - _popover = [[UIPopoverController alloc] initWithContentViewController:activityVC]; - _popover.delegate = self; - [_popover presentPopoverFromRect:rect inView:self.webView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; - } - } else if ([activityVC respondsToSelector:@selector(popoverPresentationController)]) { -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 // iOS 8.0 supported - activityVC.popoverPresentationController.sourceView = self.webView; - // position the popup at the bottom, just like iOS < 8 did (and iPhone still does on iOS 8) - NSArray *comps = [NSArray arrayWithObjects: - [NSNumber numberWithInt:(self.viewController.view.frame.size.width/2)-200], - [NSNumber numberWithInt:self.viewController.view.frame.size.height], - [NSNumber numberWithInt:400], - [NSNumber numberWithInt:400], - nil]; - CGRect rect = [self getPopupRectFromIPadPopupCoordinates:comps]; - activityVC.popoverPresentationController.sourceRect = rect; -#endif - } - } - [[self getTopMostViewController] presentViewController:activityVC animated:YES completion:nil]; - }); - }]; -} - -- (void)shareViaTwitter:(CDVInvokedUrlCommand*)command { - [self shareViaInternal:command type:SLServiceTypeTwitter]; -} - -- (void)shareViaFacebook:(CDVInvokedUrlCommand*)command { - [self shareViaInternal:command type:SLServiceTypeFacebook]; -} - -- (void)shareViaFacebookWithPasteMessageHint:(CDVInvokedUrlCommand*)command { - // If Fb app is installed a message is not prefilled. - // When shared through the default iOS widget (iOS Settings > Facebook) the message is prefilled already. - NSString *message = [command.arguments objectAtIndex:0]; - if (message != (id)[NSNull null]) { - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 1000 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{ - BOOL fbAppInstalled = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fb://"]]; // requires whitelisting on iOS9 - if (fbAppInstalled) { - UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; - [pasteboard setValue:message forPasteboardType:@"public.text"]; - NSString *hint = [command.arguments objectAtIndex:4]; - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:hint delegate:nil cancelButtonTitle:nil otherButtonTitles:nil]; - [alert show]; - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2800 * NSEC_PER_MSEC), dispatch_get_main_queue(), ^{ - [alert dismissWithClickedButtonIndex:-1 animated:YES]; - }); - } - }); - } - [self shareViaInternal:command type:SLServiceTypeFacebook]; -} - -- (void)shareVia:(CDVInvokedUrlCommand*)command { - [self shareViaInternal:command type:[command.arguments objectAtIndex:4]]; -} - -- (void)canShareVia:(CDVInvokedUrlCommand*)command { - NSString *via = [command.arguments objectAtIndex:4]; - CDVPluginResult * pluginResult; - if ([@"sms" caseInsensitiveCompare:via] == NSOrderedSame && [self canShareViaSMS]) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else if ([@"email" caseInsensitiveCompare:via] == NSOrderedSame && [self isEmailAvailable]) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else if ([@"whatsapp" caseInsensitiveCompare:via] == NSOrderedSame && [self canShareViaWhatsApp]) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else if ([@"instagram" caseInsensitiveCompare:via] == NSOrderedSame && [self canShareViaInstagram]) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else if ([self isAvailableForSharing:command type:via]) { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - } else { - pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - } - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; -} - -- (void)canShareViaEmail:(CDVInvokedUrlCommand*)command { - if ([self isEmailAvailable]) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } else { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } -} - -- (bool)isEmailAvailable { - Class messageClass = (NSClassFromString(@"MFMailComposeViewController")); - return messageClass != nil && [messageClass canSendMail]; -} - -- (bool)isAvailableForSharing:(CDVInvokedUrlCommand*)command - type:(NSString *) type { - // isAvailableForServiceType returns true if you pass it a type that is not - // in the defined constants, this is probably a bug on apples part - if(!([type isEqualToString:SLServiceTypeFacebook] - || [type isEqualToString:SLServiceTypeTwitter] - || [type isEqualToString:SLServiceTypeTencentWeibo] - || [type isEqualToString:SLServiceTypeSinaWeibo])) { - return false; - } - // wrapped in try-catch, because isAvailableForServiceType may crash if an invalid type is passed - @try { - return [SLComposeViewController isAvailableForServiceType:type]; - } - @catch (NSException* exception) { - return false; - } -} - -- (void)shareViaInternal:(CDVInvokedUrlCommand*)command - type:(NSString *) type { - - NSString *message = [command.arguments objectAtIndex:0]; - // subject is not supported by the SLComposeViewController - NSArray *filenames = [command.arguments objectAtIndex:2]; - NSString *urlString = [command.arguments objectAtIndex:3]; - - // boldly invoke the target app, because the phone will display a nice message asking to configure the app - SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:type]; - if (message != (id)[NSNull null]) { - [composeViewController setInitialText:message]; - } - - for (NSString* filename in filenames) { - UIImage* image = [self getImage:filename]; - if (image != nil) { - [composeViewController addImage:image]; - } - } - - if (urlString != (id)[NSNull null]) { - [composeViewController addURL:[NSURL URLWithString:urlString]]; - } - - [composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) { - if (SLComposeViewControllerResultCancelled == result) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"cancelled"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } else if ([self isAvailableForSharing:command type:type]) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:SLComposeViewControllerResultDone == result]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } else { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } - // required for iOS6 (issues #162 and #167) - [self.viewController dismissViewControllerAnimated:YES completion:nil]; - }]; - [[self getTopMostViewController] presentViewController:composeViewController animated:YES completion:nil]; -} - -- (void)shareViaEmail:(CDVInvokedUrlCommand*)command { - if ([self isEmailAvailable]) { - - if (TARGET_IPHONE_SIMULATOR && IsAtLeastiOSVersion(@"8.0")) { - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"SocialSharing plugin" - message:@"Sharing via email is not supported on the iOS 8 simulator." - delegate:nil - cancelButtonTitle:@"OK" - otherButtonTitles:nil]; - [alert show]; - return; - } - - self.globalMailComposer.mailComposeDelegate = self; - - if ([command.arguments objectAtIndex:0] != (id)[NSNull null]) { - NSString *message = [command.arguments objectAtIndex:0]; - BOOL isHTML = [message rangeOfString:@"<[^>]+>" options:NSRegularExpressionSearch].location != NSNotFound; - [self.globalMailComposer setMessageBody:message isHTML:isHTML]; - } - - if ([command.arguments objectAtIndex:1] != (id)[NSNull null]) { - [self.globalMailComposer setSubject: [command.arguments objectAtIndex:1]]; - } - - if ([command.arguments objectAtIndex:2] != (id)[NSNull null]) { - [self.globalMailComposer setToRecipients:[command.arguments objectAtIndex:2]]; - } - - if ([command.arguments objectAtIndex:3] != (id)[NSNull null]) { - [self.globalMailComposer setCcRecipients:[command.arguments objectAtIndex:3]]; - } - - if ([command.arguments objectAtIndex:4] != (id)[NSNull null]) { - [self.globalMailComposer setBccRecipients:[command.arguments objectAtIndex:4]]; - } - - if ([command.arguments objectAtIndex:5] != (id)[NSNull null]) { - NSArray* attachments = [command.arguments objectAtIndex:5]; - NSFileManager* fileManager = [NSFileManager defaultManager]; - for (NSString* path in attachments) { - NSURL *file = [self getFile:path]; - NSData* data = [fileManager contentsAtPath:file.path]; - - NSString* fileName; - NSString* mimeType; - NSString* basename = [self getBasenameFromAttachmentPath:path]; - - if ([basename hasPrefix:@"data:"]) { - mimeType = (NSString*)[[[basename substringFromIndex:5] componentsSeparatedByString: @";"] objectAtIndex:0]; - fileName = @"attachment."; - fileName = [fileName stringByAppendingString:(NSString*)[[mimeType componentsSeparatedByString: @"/"] lastObject]]; - NSString *base64content = (NSString*)[[basename componentsSeparatedByString: @","] lastObject]; - data = [SocialSharing dataFromBase64String:base64content]; - } else { - fileName = [basename pathComponents].lastObject; - mimeType = [self getMimeTypeFromFileExtension:[basename pathExtension]]; - } - [self.globalMailComposer addAttachmentData:data mimeType:mimeType fileName:fileName]; - } - } - - // remember the command, because we need it in the didFinishWithResult method - _command = command; - - [self.commandDelegate runInBackground:^{ - [[self getTopMostViewController] presentViewController:self.globalMailComposer animated:YES completion:nil]; - }]; - - } else { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } -} - -- (UIViewController*) getTopMostViewController { - UIViewController *presentingViewController = [[[UIApplication sharedApplication] delegate] window].rootViewController; - while (presentingViewController.presentedViewController != nil) { - presentingViewController = presentingViewController.presentedViewController; - } - return presentingViewController; -} - -- (NSString*) getBasenameFromAttachmentPath:(NSString*)path { - if ([path hasPrefix:@"base64:"]) { - NSString* pathWithoutPrefix = [path stringByReplacingOccurrencesOfString:@"base64:" withString:@""]; - return [pathWithoutPrefix substringToIndex:[pathWithoutPrefix rangeOfString:@"//"].location]; - } - return path; -} - -- (NSString*) getMimeTypeFromFileExtension:(NSString*)extension { - if (!extension) { - return nil; - } - // Get the UTI from the file's extension - CFStringRef ext = (CFStringRef)CFBridgingRetain(extension); - CFStringRef type = UTTypeCreatePreferredIdentifierForTag(kUTTagClassFilenameExtension, ext, NULL); - // Converting UTI to a mime type - NSString *result = (NSString*)CFBridgingRelease(UTTypeCopyPreferredTagWithClass(type, kUTTagClassMIMEType)); - CFRelease(ext); - CFRelease(type); - return result; -} - -/** - * Delegate will be called after the mail composer did finish an action - * to dismiss the view. - */ -- (void) mailComposeController:(MFMailComposeViewController*)controller - didFinishWithResult:(MFMailComposeResult)result - error:(NSError*)error { - bool ok = result == MFMailComposeResultSent; - [self.globalMailComposer dismissViewControllerAnimated:YES completion:^{[self cycleTheGlobalMailComposer];}]; - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:ok]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:_command.callbackId]; -} - --(void)cycleTheGlobalMailComposer { - // we are cycling the damned GlobalMailComposer: http://stackoverflow.com/questions/25604552/i-have-real-misunderstanding-with-mfmailcomposeviewcontroller-in-swift-ios8-in/25604976#25604976 - self.globalMailComposer = nil; - self.globalMailComposer = [[MFMailComposeViewController alloc] init]; -} - -- (bool)canShareViaSMS { - Class messageClass = (NSClassFromString(@"MFMessageComposeViewController")); - return messageClass != nil && [messageClass canSendText]; -} - -- (void)shareViaSMS:(CDVInvokedUrlCommand*)command { - if ([self canShareViaSMS]) { - NSDictionary* options = [command.arguments objectAtIndex:0]; - NSString *phonenumbers = [command.arguments objectAtIndex:1]; - NSString *message = [options objectForKey:@"message"]; - NSString *subject = [options objectForKey:@"subject"]; - NSString *image = [options objectForKey:@"image"]; - - MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init]; - picker.messageComposeDelegate = (id) self; - if (message != (id)[NSNull null]) { - picker.body = message; - } - if (subject != (id)[NSNull null]) { - [picker setSubject:subject]; - } - if (image != nil && image != (id)[NSNull null]) { - BOOL canSendAttachments = [[MFMessageComposeViewController class] respondsToSelector:@selector(canSendAttachments)]; - if (canSendAttachments) { - NSURL *file = [self getFile:image]; - if (file != nil) { - [picker addAttachmentURL:file withAlternateFilename:nil]; - } - } - } - - if (phonenumbers != (id)[NSNull null]) { - [picker setRecipients:[phonenumbers componentsSeparatedByString:@","]]; - } - // remember the command, because we need it in the didFinishWithResult method - _command = command; - [self.commandDelegate runInBackground:^{ - picker.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; - [[self getTopMostViewController] presentViewController:picker animated:YES completion:nil]; - }]; - } else { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } -} - -// Dismisses the SMS composition interface when users taps Cancel or Send -- (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result { - bool ok = result == MessageComposeResultSent; - [[self getTopMostViewController] dismissViewControllerAnimated:YES completion:nil]; - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:ok]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:_command.callbackId]; -} - -- (bool)canShareViaInstagram { - return [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"instagram://app"]]; // requires whitelisting on iOS9 -} - -- (bool)canShareViaWhatsApp { - return [[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]; // requires whitelisting on iOS9 -} - -// this is only an internal test method for now, can be used to open a share sheet with 'Open in xx' links for tumblr, drive, dropbox, .. -- (void)openImage:(NSString *)imageName { - UIImage* image =[self getImage:imageName]; - if (image != nil) { - NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/myTempImage.jpg"]; - [UIImageJPEGRepresentation(image, 1.0) writeToFile:savePath atomically:YES]; - _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]]; - _documentInteractionController.UTI = @""; // TODO find the scheme for google drive and create a shareViaGoogleDrive function - [_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.viewController.view animated: YES]; - } -} - -- (void)shareViaInstagram:(CDVInvokedUrlCommand*)command { - - // on iOS9 canShareVia('instagram'..) will only work if instagram:// is whitelisted. - // If it's not, this method will ask permission to the user on iOS9 for opening the app, - // which is of course better than Instagram sharing not working at all because you forgot to whitelist it. - // Tradeoff: on iOS9 this method will always return true, so make sure to whitelist it and call canShareVia('instagram'..) - if (!IsAtLeastiOSVersion(@"9.0")) { - if (![self canShareViaInstagram]) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - return; - } - } - - NSString *message = [command.arguments objectAtIndex:0]; - // subject is not supported by the SLComposeViewController - NSArray *filenames = [command.arguments objectAtIndex:2]; - - // only use the first image (for now.. maybe we can share in a loop?) - UIImage* image = nil; - for (NSString* filename in filenames) { - image = [self getImage:filename]; - break; - } - -// NSData *imageObj = [NSData dataFromBase64String:objectAtIndex0]; - NSString *tmpDir = NSTemporaryDirectory(); - NSString *path = [tmpDir stringByAppendingPathComponent:@"instagram.igo"]; - [UIImageJPEGRepresentation(image, 1.0) writeToFile:path atomically:YES]; - - _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:path]]; - _documentInteractionController.delegate = self; - _documentInteractionController.UTI = @"com.instagram.exclusivegram"; - - if (message != (id)[NSNull null]) { - // no longer working, so .. - _documentInteractionController.annotation = @{@"InstagramCaption" : message}; - - // .. we put the message on the clipboard (you app can prompt the user to paste it) - UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; - [pasteboard setValue:message forPasteboardType:@"public.text"]; - } - - // remember the command for the delegate method - _command = command; - [_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.webView animated:YES]; -} - -- (void)shareViaWhatsApp:(CDVInvokedUrlCommand*)command { - - // on iOS9 canShareVia('whatsapp'..) will only work if whatsapp:// is whitelisted. - // If it's not, this method will ask permission to the user on iOS9 for opening the app, - // which is of course better than WhatsApp sharing not working at all because you forgot to whitelist it. - // Tradeoff: on iOS9 this method will always return true, so make sure to whitelist it and call canShareVia('whatsapp'..) - if (!IsAtLeastiOSVersion(@"9.0")) { - if (![self canShareViaWhatsApp]) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"not available"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - return; - } - } - - NSString *message = [command.arguments objectAtIndex:0]; - // subject is not supported by the SLComposeViewController - NSArray *filenames = [command.arguments objectAtIndex:2]; - NSString *urlString = [command.arguments objectAtIndex:3]; - - // only use the first image (for now.. maybe we can share in a loop?) - UIImage* image = nil; - for (NSString* filename in filenames) { - image = [self getImage:filename]; - break; - } - - // with WhatsApp, we can share an image OR text+url.. image wins if set - if (image != nil) { - NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"]; - [UIImageJPEGRepresentation(image, 1.0) writeToFile:savePath atomically:YES]; - _documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]]; - _documentInteractionController.UTI = @"net.whatsapp.image"; - _documentInteractionController.delegate = self; - _command = command; - [_documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.viewController.view animated: YES]; - } else { - // append an url to a message, if both are passed - NSString * shareString = @""; - if (message != (id)[NSNull null]) { - shareString = message; - } - if (urlString != (id)[NSNull null]) { - if ([shareString isEqual: @""]) { - shareString = urlString; - } else { - shareString = [NSString stringWithFormat:@"%@ %@", shareString, urlString]; - } - } - NSString * encodedShareString = [shareString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; - // also encode the '=' character - encodedShareString = [encodedShareString stringByReplacingOccurrencesOfString:@"=" withString:@"%3D"]; - encodedShareString = [encodedShareString stringByReplacingOccurrencesOfString:@"&" withString:@"%26"]; - NSString * encodedShareStringForWhatsApp = [NSString stringWithFormat:@"whatsapp://send?text=%@", encodedShareString]; - - NSURL *whatsappURL = [NSURL URLWithString:encodedShareStringForWhatsApp]; - [[UIApplication sharedApplication] openURL: whatsappURL]; - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - } -} - -- (void)saveToPhotoAlbum:(CDVInvokedUrlCommand*)command { - self.command = command; - NSArray *filenames = [command.arguments objectAtIndex:0]; - [self.commandDelegate runInBackground:^{ - bool shared = false; - for (NSString* filename in filenames) { - UIImage* image = [self getImage:filename]; - if (image != nil) { - shared = true; - UIImageWriteToSavedPhotosAlbum(image, self, @selector(thisImage:wasSavedToPhotoAlbumWithError:contextInfo:), nil); - } - } - if (!shared) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"no valid image was passed"]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.command.callbackId]; - } - }]; -} - -// called from saveToPhotoAlbum, note that we only send feedback for the first image that's being saved (not keeping the callback) -// but since the UIImageWriteToSavedPhotosAlbum function is only called with valid images that should not be a problem -- (void)thisImage:(UIImage *)image wasSavedToPhotoAlbumWithError:(NSError *)error contextInfo:(void*)ctxInfo { - if (error) { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:error.localizedDescription]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.command.callbackId]; - } else { - CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.command.callbackId]; - } -} - --(UIImage*)getImage: (NSString *)imageName { - UIImage *image = nil; - if (imageName != (id)[NSNull null]) { - if ([imageName hasPrefix:@"http"]) { - image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:imageName]]]; - } else if ([imageName hasPrefix:@"www/"]) { - image = [UIImage imageNamed:imageName]; - } else if ([imageName hasPrefix:@"file://"]) { - image = [UIImage imageWithData:[NSData dataWithContentsOfFile:[[NSURL URLWithString:imageName] path]]]; - } else if ([imageName hasPrefix:@"data:"]) { - // using a base64 encoded string - NSURL *imageURL = [NSURL URLWithString:imageName]; - NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; - image = [UIImage imageWithData:imageData]; - } else if ([imageName hasPrefix:@"assets-library://"]) { - // use assets-library - NSURL *imageURL = [NSURL URLWithString:imageName]; - NSData *imageData = [NSData dataWithContentsOfURL:imageURL]; - image = [UIImage imageWithData:imageData]; - } else { - // assume anywhere else, on the local filesystem - image = [UIImage imageWithData:[NSData dataWithContentsOfFile:imageName]]; - } - } - return image; -} - --(NSURL*)getFile: (NSString *)fileName { - NSURL *file = nil; - if (fileName != (id)[NSNull null]) { - if ([fileName hasPrefix:@"http"]) { - NSURL *url = [NSURL URLWithString:fileName]; - NSData *fileData = [NSData dataWithContentsOfURL:url]; - file = [NSURL fileURLWithPath:[self storeInFile:(NSString*)[[fileName componentsSeparatedByString: @"/"] lastObject] fileData:fileData]]; - } else if ([fileName hasPrefix:@"www/"]) { - NSString *bundlePath = [[NSBundle mainBundle] bundlePath]; - NSString *fullPath = [NSString stringWithFormat:@"%@/%@", bundlePath, fileName]; - file = [NSURL fileURLWithPath:fullPath]; - } else if ([fileName hasPrefix:@"file://"]) { - // stripping the first 6 chars, because the path should start with / instead of file:// - file = [NSURL fileURLWithPath:[fileName substringFromIndex:6]]; - } else if ([fileName hasPrefix:@"data:"]) { - // using a base64 encoded string - // extract some info from the 'fileName', which is for example: data:text/calendar;base64, - NSString *fileType = (NSString*)[[[fileName substringFromIndex:5] componentsSeparatedByString: @";"] objectAtIndex:0]; - fileType = (NSString*)[[fileType componentsSeparatedByString: @"/"] lastObject]; - NSString *base64content = (NSString*)[[fileName componentsSeparatedByString: @","] lastObject]; - NSData *fileData = [SocialSharing dataFromBase64String:base64content]; - file = [NSURL fileURLWithPath:[self storeInFile:[NSString stringWithFormat:@"%@.%@", @"file", fileType] fileData:fileData]]; - } else { - // assume anywhere else, on the local filesystem - file = [NSURL fileURLWithPath:fileName]; - } - } - return file; -} - --(NSString*) storeInFile: (NSString*) fileName - fileData: (NSData*) fileData { - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); - NSString *documentsDirectory = [paths objectAtIndex:0]; - NSString *filePath = [documentsDirectory stringByAppendingPathComponent:fileName]; - [fileData writeToFile:filePath atomically:YES]; - _tempStoredFile = filePath; - return filePath; -} - -- (void) cleanupStoredFiles { - if (_tempStoredFile != nil) { - NSError *error; - [[NSFileManager defaultManager]removeItemAtPath:_tempStoredFile error:&error]; - } -} - -+ (NSData*) dataFromBase64String:(NSString*)aString { - return [[NSData alloc] initWithBase64EncodedString:aString options:0]; -} - -#pragma mark - UIPopoverControllerDelegate methods - -- (void)popoverController:(UIPopoverController *)popoverController willRepositionPopoverToRect:(inout CGRect *)rect inView:(inout UIView **)view { - NSArray *comps = [[self getIPadPopupCoordinates] componentsSeparatedByString:@","]; - CGRect newRect = [self getPopupRectFromIPadPopupCoordinates:comps]; - rect->origin = newRect.origin; -} - -- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController { - _popover = nil; -} - -#pragma mark - UIDocumentInteractionControllerDelegate methods - -- (void) documentInteractionController: (UIDocumentInteractionController *) controller willBeginSendingToApplication: (NSString *) application { - // note that the application actually contains the app bundle id which was picked (for whatsapp and instagram only) - NSLog(@"SocialSharing app selected: %@", application); -} - -- (void) documentInteractionControllerDidDismissOpenInMenu: (UIDocumentInteractionController *) controller { - if (self.command != nil) { - CDVPluginResult *result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - [self.commandDelegate sendPluginResult:result callbackId: self.command.callbackId]; - } -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.h deleted file mode 100644 index be79903e..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.h +++ /dev/null @@ -1,21 +0,0 @@ -// -// AppDelegate+notification.h -// pushtest -// -// Created by Robert Easterday on 10/26/12. -// -// - -#import "AppDelegate.h" - -@interface AppDelegate (notification) -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo; -- (void)applicationDidBecomeActive:(UIApplication *)application; -- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler; -- (id) getCommandInstance:(NSString*)className; - -@property (nonatomic, retain) NSDictionary *launchNotification; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.m deleted file mode 100644 index 8b4ed161..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/AppDelegate+notification.m +++ /dev/null @@ -1,167 +0,0 @@ -// -// AppDelegate+notification.m -// pushtest -// -// Created by Robert Easterday on 10/26/12. -// -// - -#import "AppDelegate+notification.h" -#import "PushPlugin.h" -#import - -static char launchNotificationKey; - -@implementation AppDelegate (notification) - -- (id) getCommandInstance:(NSString*)className -{ - return [self.viewController getCommandInstance:className]; -} - -// its dangerous to override a method from within a category. -// Instead we will use method swizzling. we set this up in the load call. -+ (void)load -{ - Method original, swizzled; - - original = class_getInstanceMethod(self, @selector(init)); - swizzled = class_getInstanceMethod(self, @selector(swizzled_init)); - method_exchangeImplementations(original, swizzled); -} - -- (AppDelegate *)swizzled_init -{ - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(createNotificationChecker:) - name:@"UIApplicationDidFinishLaunchingNotification" object:nil]; - - // This actually calls the original init method over in AppDelegate. Equivilent to calling super - // on an overrided method, this is not recursive, although it appears that way. neat huh? - return [self swizzled_init]; -} - -// This code will be called immediately after application:didFinishLaunchingWithOptions:. We need -// to process notifications in cold-start situations -- (void)createNotificationChecker:(NSNotification *)notification -{ - if (notification) - { - NSDictionary *launchOptions = [notification userInfo]; - if (launchOptions) - self.launchNotification = [launchOptions objectForKey: @"UIApplicationLaunchOptionsRemoteNotificationKey"]; - } -} - -- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { - PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; - [pushHandler didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]; -} - -- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { - PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; - [pushHandler didFailToRegisterForRemoteNotificationsWithError:error]; -} - -- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - NSLog(@"didReceiveNotification with fetchCompletionHandler"); - - // app is in the foreground so call notification callback - if (application.applicationState == UIApplicationStateActive) { - NSLog(@"app active"); - PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; - pushHandler.notificationMessage = userInfo; - pushHandler.isInline = YES; - [pushHandler notificationReceived]; - - completionHandler(UIBackgroundFetchResultNewData); - } - // app is in background or in stand by - else { - NSLog(@"app in-active"); - - // do some convoluted logic to find out if this should be a silent push. - long silent = 0; - id aps = [userInfo objectForKey:@"aps"]; - id contentAvailable = [aps objectForKey:@"content-available"]; - if ([contentAvailable isKindOfClass:[NSString class]] && [contentAvailable isEqualToString:@"1"]) { - silent = 1; - } else if ([contentAvailable isKindOfClass:[NSNumber class]]) { - silent = [contentAvailable integerValue]; - } - - if (silent == 1) { - NSLog(@"this should be a silent push"); - void (^safeHandler)(UIBackgroundFetchResult) = ^(UIBackgroundFetchResult result){ - dispatch_async(dispatch_get_main_queue(), ^{ - completionHandler(result); - }); - }; - - NSMutableDictionary* params = [NSMutableDictionary dictionaryWithCapacity:2]; - [params setObject:safeHandler forKey:@"handler"]; - - PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; - pushHandler.notificationMessage = userInfo; - pushHandler.isInline = NO; - pushHandler.handlerObj = params; - [pushHandler notificationReceived]; - } else { - NSLog(@"just put it in the shade"); - //save it for later - self.launchNotification = userInfo; - - completionHandler(UIBackgroundFetchResultNewData); - } - } -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - - NSLog(@"active"); - - PushPlugin *pushHandler = [self getCommandInstance:@"PushNotification"]; - if (pushHandler.clearBadge) { - NSLog(@"PushPlugin clearing badge"); - //zero badge - application.applicationIconBadgeNumber = 0; - } else { - NSLog(@"PushPlugin skip clear badge"); - } - - if (self.launchNotification) { - pushHandler.isInline = NO; - pushHandler.notificationMessage = self.launchNotification; - self.launchNotification = nil; - [pushHandler performSelectorOnMainThread:@selector(notificationReceived) withObject:pushHandler waitUntilDone:NO]; - } -} - -//For interactive notification only -- (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forRemoteNotification:(NSDictionary *)userInfo completionHandler:(void(^)())completionHandler -{ - //handle the actions - if ([identifier isEqualToString:@"declineAction"]){ - } - else if ([identifier isEqualToString:@"answerAction"]){ - } -} - - -// The accessors use an Associative Reference since you can't define a iVar in a category -// http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/Chapters/ocAssociativeReferences.html -- (NSMutableArray *)launchNotification -{ - return objc_getAssociatedObject(self, &launchNotificationKey); -} - -- (void)setLaunchNotification:(NSDictionary *)aDictionary -{ - objc_setAssociatedObject(self, &launchNotificationKey, aDictionary, OBJC_ASSOCIATION_RETAIN_NONATOMIC); -} - -- (void)dealloc -{ - self.launchNotification = nil; // clear the association and release the object -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.h b/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.h deleted file mode 100644 index 5b88398e..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - Copyright 2009-2011 Urban Airship Inc. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - 2. Redistributions in binaryform must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided withthe distribution. - - THIS SOFTWARE IS PROVIDED BY THE URBAN AIRSHIP INC``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL URBAN AIRSHIP INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import -#import -#import - -@interface PushPlugin : CDVPlugin -{ - NSDictionary *notificationMessage; - BOOL isInline; - NSString *notificationCallbackId; - NSString *callback; - BOOL clearBadge; - - NSDictionary *handlerObj; - void (^completionHandler)(UIBackgroundFetchResult); - - BOOL ready; -} - -@property (nonatomic, copy) NSString *callbackId; -@property (nonatomic, copy) NSString *notificationCallbackId; -@property (nonatomic, copy) NSString *callback; - -@property (nonatomic, strong) NSDictionary *notificationMessage; -@property BOOL isInline; -@property BOOL clearBadge; -@property (nonatomic, strong) NSDictionary *handlerObj; - -- (void)init:(CDVInvokedUrlCommand*)command; -- (void)unregister:(CDVInvokedUrlCommand*)command; - -- (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken; -- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error; - -- (void)setNotificationMessage:(NSDictionary *)notification; -- (void)notificationReceived; - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.m b/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.m deleted file mode 100644 index 40f494d1..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/Plugins/phonegap-plugin-push/PushPlugin.m +++ /dev/null @@ -1,347 +0,0 @@ -/* - Copyright 2009-2011 Urban Airship Inc. All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - 2. Redistributions in binaryform must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided withthe distribution. - - THIS SOFTWARE IS PROVIDED BY THE URBAN AIRSHIP INC``AS IS'' AND ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - EVENT SHALL URBAN AIRSHIP INC OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE - OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#import "PushPlugin.h" - -@implementation PushPlugin - -@synthesize notificationMessage; -@synthesize isInline; - -@synthesize callbackId; -@synthesize notificationCallbackId; -@synthesize callback; -@synthesize clearBadge; -@synthesize handlerObj; - -- (void)unregister:(CDVInvokedUrlCommand*)command; -{ - self.callbackId = command.callbackId; - - [[UIApplication sharedApplication] unregisterForRemoteNotifications]; - [self successWithMessage:@"unregistered"]; -} - -- (void)init:(CDVInvokedUrlCommand*)command; -{ - [self.commandDelegate runInBackground:^ { - - NSLog(@"Push Plugin register called"); - self.callbackId = command.callbackId; - - NSMutableDictionary* options = [command.arguments objectAtIndex:0]; - NSMutableDictionary* iosOptions = [options objectForKey:@"ios"]; - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - UIUserNotificationType UserNotificationTypes = UIUserNotificationTypeNone; -#endif - UIRemoteNotificationType notificationTypes = UIRemoteNotificationTypeNone; - - id badgeArg = [iosOptions objectForKey:@"badge"]; - id soundArg = [iosOptions objectForKey:@"sound"]; - id alertArg = [iosOptions objectForKey:@"alert"]; - id clearBadgeArg = [iosOptions objectForKey:@"clearBadge"]; - - if (([badgeArg isKindOfClass:[NSString class]] && [badgeArg isEqualToString:@"true"]) || [badgeArg boolValue]) - { - notificationTypes |= UIRemoteNotificationTypeBadge; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - UserNotificationTypes |= UIUserNotificationTypeBadge; -#endif - } - - if (([soundArg isKindOfClass:[NSString class]] && [soundArg isEqualToString:@"true"]) || [soundArg boolValue]) - { - notificationTypes |= UIRemoteNotificationTypeSound; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - UserNotificationTypes |= UIUserNotificationTypeSound; -#endif - } - - if (([alertArg isKindOfClass:[NSString class]] && [alertArg isEqualToString:@"true"]) || [alertArg boolValue]) - { - notificationTypes |= UIRemoteNotificationTypeAlert; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - UserNotificationTypes |= UIUserNotificationTypeAlert; -#endif - } - - notificationTypes |= UIRemoteNotificationTypeNewsstandContentAvailability; -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - UserNotificationTypes |= UIUserNotificationActivationModeBackground; -#endif - - if (clearBadgeArg == nil || ([clearBadgeArg isKindOfClass:[NSString class]] && [clearBadgeArg isEqualToString:@"false"]) || ![clearBadgeArg boolValue]) { - NSLog(@"PushPlugin.register: setting badge to false"); - clearBadge = NO; - } else { - NSLog(@"PushPlugin.register: setting badge to true"); - clearBadge = YES; - [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; - } - NSLog(@"PushPlugin.register: clear badge is set to %d", clearBadge); - - if (notificationTypes == UIRemoteNotificationTypeNone) - NSLog(@"PushPlugin.register: Push notification type is set to none"); - - isInline = NO; - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000 - if ([[UIApplication sharedApplication]respondsToSelector:@selector(registerUserNotificationSettings:)]) { - UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:UserNotificationTypes categories:nil]; - [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; - [[UIApplication sharedApplication] registerForRemoteNotifications]; - } else { - [[UIApplication sharedApplication] registerForRemoteNotificationTypes: - (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; - } -#else - [[UIApplication sharedApplication] registerForRemoteNotificationTypes: - (UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)]; -#endif - - if (notificationMessage) // if there is a pending startup notification - [self notificationReceived]; // go ahead and process it - - }]; -} - -- (void)didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { - if (self.callbackId == nil) { - NSLog(@"Unexpected call to didRegisterForRemoteNotificationsWithDeviceToken, ignoring: %@", deviceToken); - return; - } - NSLog(@"Push Plugin register success: %@", deviceToken); - - NSMutableDictionary *results = [NSMutableDictionary dictionary]; - NSString *token = [[[[deviceToken description] stringByReplacingOccurrencesOfString:@"<"withString:@""] - stringByReplacingOccurrencesOfString:@">" withString:@""] - stringByReplacingOccurrencesOfString: @" " withString: @""]; - [results setValue:token forKey:@"deviceToken"]; - -#if !TARGET_IPHONE_SIMULATOR - // Get Bundle Info for Remote Registration (handy if you have more than one app) - [results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"] forKey:@"appName"]; - [results setValue:[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"] forKey:@"appVersion"]; - - // Check what Notifications the user has turned on. We registered for all three, but they may have manually disabled some or all of them. -#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending) - - NSUInteger rntypes; - if (!SYSTEM_VERSION_LESS_THAN(@"8.0")) { - rntypes = [[[UIApplication sharedApplication] currentUserNotificationSettings] types]; - } else { - rntypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; - } - - // Set the defaults to disabled unless we find otherwise... - NSString *pushBadge = @"disabled"; - NSString *pushAlert = @"disabled"; - NSString *pushSound = @"disabled"; - - // Check what Registered Types are turned on. This is a bit tricky since if two are enabled, and one is off, it will return a number 2... not telling you which - // one is actually disabled. So we are literally checking to see if rnTypes matches what is turned on, instead of by number. The "tricky" part is that the - // single notification types will only match if they are the ONLY one enabled. Likewise, when we are checking for a pair of notifications, it will only be - // true if those two notifications are on. This is why the code is written this way - if(rntypes & UIRemoteNotificationTypeBadge){ - pushBadge = @"enabled"; - } - if(rntypes & UIRemoteNotificationTypeAlert) { - pushAlert = @"enabled"; - } - if(rntypes & UIRemoteNotificationTypeSound) { - pushSound = @"enabled"; - } - - [results setValue:pushBadge forKey:@"pushBadge"]; - [results setValue:pushAlert forKey:@"pushAlert"]; - [results setValue:pushSound forKey:@"pushSound"]; - - // Get the users Device Model, Display Name, Token & Version Number - UIDevice *dev = [UIDevice currentDevice]; - [results setValue:dev.name forKey:@"deviceName"]; - [results setValue:dev.model forKey:@"deviceModel"]; - [results setValue:dev.systemVersion forKey:@"deviceSystemVersion"]; - - // Send result to trigger 'registration' event but keep callback - NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:1]; - [message setObject:token forKey:@"registrationId"]; - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message]; - [pluginResult setKeepCallbackAsBool:YES]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; -#endif -} - -- (void)didFailToRegisterForRemoteNotificationsWithError:(NSError *)error -{ - if (self.callbackId == nil) { - NSLog(@"Unexpected call to didFailToRegisterForRemoteNotificationsWithError, ignoring: %@", error); - return; - } - NSLog(@"Push Plugin register failed"); - [self failWithMessage:@"" withError:error]; -} - -- (void)notificationReceived { - NSLog(@"Notification received"); - - if (notificationMessage && self.callbackId != nil) - { - NSMutableDictionary* message = [NSMutableDictionary dictionaryWithCapacity:4]; - NSMutableDictionary* additionalData = [NSMutableDictionary dictionaryWithCapacity:4]; - - - for (id key in notificationMessage) { - if ([key isEqualToString:@"aps"]) { - id aps = [notificationMessage objectForKey:@"aps"]; - - for(id key in aps) { - NSLog(@"Push Plugin key: %@", key); - id value = [aps objectForKey:key]; - - if ([key isEqualToString:@"alert"]) { - if ([value isKindOfClass:[NSDictionary class]]) { - for (id messageKey in value) { - id messageValue = [value objectForKey:messageKey]; - if ([messageKey isEqualToString:@"body"]) { - [message setObject:messageValue forKey:@"message"]; - } else if ([messageKey isEqualToString:@"title"]) { - [message setObject:messageValue forKey:@"title"]; - } else { - [additionalData setObject:messageValue forKey:messageKey]; - } - } - } - else { - [message setObject:value forKey:@"message"]; - } - } else if ([key isEqualToString:@"title"]) { - [message setObject:value forKey:@"title"]; - } else if ([key isEqualToString:@"badge"]) { - [message setObject:value forKey:@"count"]; - } else if ([key isEqualToString:@"sound"]) { - [message setObject:value forKey:@"sound"]; - } else if ([key isEqualToString:@"image"]) { - [message setObject:value forKey:@"image"]; - } else { - [additionalData setObject:value forKey:key]; - } - } - } else { - [additionalData setObject:[notificationMessage objectForKey:key] forKey:key]; - } - } - - if (isInline) { - [additionalData setObject:[NSNumber numberWithBool:YES] forKey:@"foreground"]; - } else { - [additionalData setObject:[NSNumber numberWithBool:NO] forKey:@"foreground"]; - } - - [message setObject:additionalData forKey:@"additionalData"]; - - // send notification message - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:message]; - [pluginResult setKeepCallbackAsBool:YES]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; - - self.notificationMessage = nil; - } -} - -- (void)setApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command -{ - NSMutableDictionary* options = [command.arguments objectAtIndex:0]; - int badge = [[options objectForKey:@"badge"] intValue] ?: 0; - - [[UIApplication sharedApplication] setApplicationIconBadgeNumber:badge]; - - NSString* message = [NSString stringWithFormat:@"app badge count set to %d", badge]; - CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; - [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId]; -} - -- (void)getApplicationIconBadgeNumber:(CDVInvokedUrlCommand *)command -{ - NSInteger badge = [UIApplication sharedApplication].applicationIconBadgeNumber; - - CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)badge]; - [self.commandDelegate sendPluginResult:commandResult callbackId:command.callbackId]; -} - --(void)successWithMessage:(NSString *)message -{ - if (self.callbackId != nil) - { - CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsString:message]; - [self.commandDelegate sendPluginResult:commandResult callbackId:self.callbackId]; - } -} - --(void)failWithMessage:(NSString *)message withError:(NSError *)error -{ - NSString *errorMessage = (error) ? [NSString stringWithFormat:@"%@ - %@", message, [error localizedDescription]] : message; - CDVPluginResult *commandResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:errorMessage]; - - [self.commandDelegate sendPluginResult:commandResult callbackId:self.callbackId]; -} - --(void) finish:(CDVInvokedUrlCommand*)command -{ - NSLog(@"Push Plugin finish called"); - - [self.commandDelegate runInBackground:^ { - UIApplication *app = [UIApplication sharedApplication]; - float finishTimer = (app.backgroundTimeRemaining > 20.0) ? 20.0 : app.backgroundTimeRemaining; - - [NSTimer scheduledTimerWithTimeInterval:finishTimer - target:self - selector:@selector(stopBackgroundTask:) - userInfo:nil - repeats:NO]; - - CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; - [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; - }]; -} - --(void)stopBackgroundTask:(NSTimer*)timer -{ - UIApplication *app = [UIApplication sharedApplication]; - - NSLog(@"Push Plugin stopBackgroundTask called"); - - if (handlerObj) { - NSLog(@"Push Plugin handlerObj"); - completionHandler = [handlerObj[@"handler"] copy]; - if (completionHandler) { - NSLog(@"Push Plugin: stopBackgroundTask (remaining t: %f)", app.backgroundTimeRemaining); - completionHandler(UIBackgroundFetchResultNewData); - completionHandler = nil; - } - } -} - -@end diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/CDVNotification.bundle/beep.wav b/StoneIsland/platforms/ios/StoneIsland/Resources/CDVNotification.bundle/beep.wav deleted file mode 100644 index 05f5997f..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/CDVNotification.bundle/beep.wav and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-568h@2x~iphone.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-568h@2x~iphone.png deleted file mode 100644 index 10ed683c..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-568h@2x~iphone.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-667h.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-667h.png deleted file mode 100644 index d9bcf61d..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-667h.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-736h.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-736h.png deleted file mode 100644 index 1fcef229..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-736h.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape-736h.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape-736h.png deleted file mode 100644 index eae0792d..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape-736h.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape@2x~ipad.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape@2x~ipad.png deleted file mode 100644 index 1fc8c7db..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape@2x~ipad.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape~ipad.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape~ipad.png deleted file mode 100644 index 58ea2fbd..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Landscape~ipad.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait@2x~ipad.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait@2x~ipad.png deleted file mode 100644 index 1570b37d..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait@2x~ipad.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait~ipad.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait~ipad.png deleted file mode 100644 index 223e75d0..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default-Portrait~ipad.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default@2x~iphone.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default@2x~iphone.png deleted file mode 100644 index 0098dc73..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default@2x~iphone.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default~iphone.png b/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default~iphone.png deleted file mode 100644 index 42b8fdea..00000000 Binary files a/StoneIsland/platforms/ios/StoneIsland/Resources/splash/Default~iphone.png and /dev/null differ diff --git a/StoneIsland/platforms/ios/StoneIsland/StoneIsland-Info.plist b/StoneIsland/platforms/ios/StoneIsland/StoneIsland-Info.plist deleted file mode 100644 index 1e1baf13..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/StoneIsland-Info.plist +++ /dev/null @@ -1,201 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - icon.png - CFBundleIcons - - CFBundlePrimaryIcon - - CFBundleIconFiles - - icon-40 - icon-small - icon-60 - icon.png - icon@2x - icon-72 - icon-72@2x - - UIPrerenderedIcon - - - - CFBundleIcons~ipad - - CFBundlePrimaryIcon - - CFBundleIconFiles - - icon-small - icon-40 - icon-50 - icon-76 - icon-60 - icon - icon@2x - icon-72 - icon-72@2x - - UIPrerenderedIcon - - - - CFBundleIdentifier - io.cordova.hellocordova - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 0.0.1 - CFBundleShortVersionString - 0.0.1 - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - UILaunchImages - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default - UILaunchImageOrientation - Landscape - UILaunchImageSize - {320, 480} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-568h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-568h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {320, 568} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-667h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-667h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {375, 667} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-736h - UILaunchImageOrientation - Portrait - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-Landscape-736h - UILaunchImageOrientation - Landscape - UILaunchImageSize - {414, 736} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-Portrait - UILaunchImageOrientation - Portrait - UILaunchImageSize - {768, 1024} - - - UILaunchImageMinimumOSVersion - 8.0 - UILaunchImageName - Default-Landscape - UILaunchImageOrientation - Landscape - UILaunchImageSize - {768, 1024} - - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSLocationWhenInUseUsageDescription - - UIBackgroundModes - - remote-notification - - CFBundleURLTypes - - - CFBundleURLSchemes - - stoneisland - - - - CFBundleURLSchemes - - stoneisland - - - - - \ No newline at end of file diff --git a/StoneIsland/platforms/ios/StoneIsland/StoneIsland-Prefix.pch b/StoneIsland/platforms/ios/StoneIsland/StoneIsland-Prefix.pch deleted file mode 100644 index e135f6ba..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/StoneIsland-Prefix.pch +++ /dev/null @@ -1,26 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -// -// Prefix header for all source files of the 'HelloCordova' target in the 'HelloCordova' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/StoneIsland/platforms/ios/StoneIsland/config.xml b/StoneIsland/platforms/ios/StoneIsland/config.xml deleted file mode 100755 index 2fccdd54..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/config.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - StoneIsland - - Stone Island app - - - OKFocus - - - - - - - - - - - - - - - - - - - diff --git a/StoneIsland/platforms/ios/StoneIsland/main.m b/StoneIsland/platforms/ios/StoneIsland/main.m deleted file mode 100644 index 41282ad0..00000000 --- a/StoneIsland/platforms/ios/StoneIsland/main.m +++ /dev/null @@ -1,35 +0,0 @@ -/* - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, - software distributed under the License is distributed on an - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - KIND, either express or implied. See the License for the - specific language governing permissions and limitations - under the License. - */ -// -// main.m -// HelloCordova -// -// Created by ___FULLUSERNAME___ on ___DATE___. -// Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. -// - -#import - -int main(int argc, char* argv[]) -{ - @autoreleasepool { - int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate"); - return retVal; - } -} diff --git a/StoneIsland/platforms/ios/frameworks.json b/StoneIsland/platforms/ios/frameworks.json new file mode 100644 index 00000000..1b8fc309 --- /dev/null +++ b/StoneIsland/platforms/ios/frameworks.json @@ -0,0 +1,7 @@ +{ + "AudioToolbox.framework": 1, + "CoreLocation.framework": 1, + "SystemConfiguration.framework": 1, + "Social.framework": 1, + "MessageUI.framework": 1 +} \ No newline at end of file diff --git a/StoneIsland/platforms/ios/ios.json b/StoneIsland/platforms/ios/ios.json new file mode 100644 index 00000000..0ef21200 --- /dev/null +++ b/StoneIsland/platforms/ios/ios.json @@ -0,0 +1,247 @@ +{ + "prepare_queue": { + "installed": [], + "uninstalled": [] + }, + "config_munge": { + "files": { + "config.xml": { + "parents": { + "/*": [ + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + }, + { + "xml": "", + "count": 1 + } + ] + } + }, + "*-Info.plist": { + "parents": { + "NSLocationWhenInUseUsageDescription": [ + { + "xml": "", + "count": 1 + } + ], + "UIBackgroundModes": [ + { + "xml": "remote-notification", + "count": 1 + } + ], + "CFBundleURLTypes": [ + { + "xml": "CFBundleURLSchemesstoneisland", + "count": 1 + } + ] + } + } + } + }, + "installed_plugins": { + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "com.ionic.keyboard": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-console": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-device": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-dialogs": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-geolocation": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-network-information": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-splashscreen": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "phonegap-plugin-push": { + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-customurlscheme": { + "URL_SCHEME": "stoneisland", + "PACKAGE_NAME": "io.cordova.hellocordova" + }, + "cordova-plugin-x-socialsharing": { + "PACKAGE_NAME": "io.cordova.hellocordova" + } + }, + "dependent_plugins": {}, + "modules": [ + { + "file": "plugins/com.ionic.keyboard/www/keyboard.js", + "id": "com.ionic.keyboard.keyboard", + "pluginId": "com.ionic.keyboard", + "clobbers": [ + "cordova.plugins.Keyboard" + ] + }, + { + "file": "plugins/cordova-plugin-console/www/logger.js", + "id": "cordova-plugin-console.logger", + "pluginId": "cordova-plugin-console", + "clobbers": [ + "cordova.logger" + ] + }, + { + "file": "plugins/cordova-plugin-console/www/console-via-logger.js", + "id": "cordova-plugin-console.console", + "pluginId": "cordova-plugin-console", + "clobbers": [ + "console" + ] + }, + { + "file": "plugins/cordova-plugin-device/www/device.js", + "id": "cordova-plugin-device.device", + "pluginId": "cordova-plugin-device", + "clobbers": [ + "device" + ] + }, + { + "file": "plugins/cordova-plugin-dialogs/www/notification.js", + "id": "cordova-plugin-dialogs.notification", + "pluginId": "cordova-plugin-dialogs", + "merges": [ + "navigator.notification" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/Coordinates.js", + "id": "cordova-plugin-geolocation.Coordinates", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "Coordinates" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", + "id": "cordova-plugin-geolocation.PositionError", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "PositionError" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/Position.js", + "id": "cordova-plugin-geolocation.Position", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "Position" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/geolocation.js", + "id": "cordova-plugin-geolocation.geolocation", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "navigator.geolocation" + ] + }, + { + "file": "plugins/cordova-plugin-network-information/www/network.js", + "id": "cordova-plugin-network-information.network", + "pluginId": "cordova-plugin-network-information", + "clobbers": [ + "navigator.connection", + "navigator.network.connection" + ] + }, + { + "file": "plugins/cordova-plugin-network-information/www/Connection.js", + "id": "cordova-plugin-network-information.Connection", + "pluginId": "cordova-plugin-network-information", + "clobbers": [ + "Connection" + ] + }, + { + "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", + "id": "cordova-plugin-splashscreen.SplashScreen", + "pluginId": "cordova-plugin-splashscreen", + "clobbers": [ + "navigator.splashscreen" + ] + }, + { + "file": "plugins/phonegap-plugin-push/www/push.js", + "id": "phonegap-plugin-push.PushNotification", + "pluginId": "phonegap-plugin-push", + "clobbers": [ + "PushNotification" + ] + }, + { + "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", + "id": "cordova-plugin-customurlscheme.LaunchMyApp", + "pluginId": "cordova-plugin-customurlscheme", + "clobbers": [ + "window.plugins.launchmyapp" + ] + }, + { + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] + } + ], + "plugin_metadata": { + "cordova-plugin-whitelist": "1.0.0", + "com.ionic.keyboard": "1.0.4", + "cordova-plugin-console": "1.0.1", + "cordova-plugin-device": "1.0.1", + "cordova-plugin-dialogs": "1.1.1", + "cordova-plugin-geolocation": "1.0.1", + "cordova-plugin-network-information": "1.0.1", + "cordova-plugin-splashscreen": "2.1.0", + "phonegap-plugin-push": "1.4.4", + "cordova-plugin-customurlscheme": "4.0.0", + "cordova-plugin-x-socialsharing": "5.0.7" + } +} \ No newline at end of file diff --git a/StoneIsland/platforms/ios/platform_www/cordova_plugins.js b/StoneIsland/platforms/ios/platform_www/cordova_plugins.js new file mode 100644 index 00000000..d0aea848 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/cordova_plugins.js @@ -0,0 +1,141 @@ +cordova.define('cordova/plugin_list', function(require, exports, module) { +module.exports = [ + { + "file": "plugins/com.ionic.keyboard/www/keyboard.js", + "id": "com.ionic.keyboard.keyboard", + "pluginId": "com.ionic.keyboard", + "clobbers": [ + "cordova.plugins.Keyboard" + ] + }, + { + "file": "plugins/cordova-plugin-console/www/logger.js", + "id": "cordova-plugin-console.logger", + "pluginId": "cordova-plugin-console", + "clobbers": [ + "cordova.logger" + ] + }, + { + "file": "plugins/cordova-plugin-console/www/console-via-logger.js", + "id": "cordova-plugin-console.console", + "pluginId": "cordova-plugin-console", + "clobbers": [ + "console" + ] + }, + { + "file": "plugins/cordova-plugin-device/www/device.js", + "id": "cordova-plugin-device.device", + "pluginId": "cordova-plugin-device", + "clobbers": [ + "device" + ] + }, + { + "file": "plugins/cordova-plugin-dialogs/www/notification.js", + "id": "cordova-plugin-dialogs.notification", + "pluginId": "cordova-plugin-dialogs", + "merges": [ + "navigator.notification" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/Coordinates.js", + "id": "cordova-plugin-geolocation.Coordinates", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "Coordinates" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", + "id": "cordova-plugin-geolocation.PositionError", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "PositionError" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/Position.js", + "id": "cordova-plugin-geolocation.Position", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "Position" + ] + }, + { + "file": "plugins/cordova-plugin-geolocation/www/geolocation.js", + "id": "cordova-plugin-geolocation.geolocation", + "pluginId": "cordova-plugin-geolocation", + "clobbers": [ + "navigator.geolocation" + ] + }, + { + "file": "plugins/cordova-plugin-network-information/www/network.js", + "id": "cordova-plugin-network-information.network", + "pluginId": "cordova-plugin-network-information", + "clobbers": [ + "navigator.connection", + "navigator.network.connection" + ] + }, + { + "file": "plugins/cordova-plugin-network-information/www/Connection.js", + "id": "cordova-plugin-network-information.Connection", + "pluginId": "cordova-plugin-network-information", + "clobbers": [ + "Connection" + ] + }, + { + "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", + "id": "cordova-plugin-splashscreen.SplashScreen", + "pluginId": "cordova-plugin-splashscreen", + "clobbers": [ + "navigator.splashscreen" + ] + }, + { + "file": "plugins/phonegap-plugin-push/www/push.js", + "id": "phonegap-plugin-push.PushNotification", + "pluginId": "phonegap-plugin-push", + "clobbers": [ + "PushNotification" + ] + }, + { + "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", + "id": "cordova-plugin-customurlscheme.LaunchMyApp", + "pluginId": "cordova-plugin-customurlscheme", + "clobbers": [ + "window.plugins.launchmyapp" + ] + }, + { + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] + } +]; +module.exports.metadata = +// TOP OF METADATA +{ + "cordova-plugin-whitelist": "1.0.0", + "com.ionic.keyboard": "1.0.4", + "cordova-plugin-console": "1.0.1", + "cordova-plugin-device": "1.0.1", + "cordova-plugin-dialogs": "1.1.1", + "cordova-plugin-geolocation": "1.0.1", + "cordova-plugin-network-information": "1.0.1", + "cordova-plugin-splashscreen": "2.1.0", + "phonegap-plugin-push": "1.4.4", + "cordova-plugin-customurlscheme": "4.0.0", + "cordova-plugin-x-socialsharing": "5.0.7" +} +// BOTTOM OF METADATA +}); \ No newline at end of file diff --git a/StoneIsland/platforms/ios/platform_www/plugins/com.ionic.keyboard/www/keyboard.js b/StoneIsland/platforms/ios/platform_www/plugins/com.ionic.keyboard/www/keyboard.js new file mode 100644 index 00000000..7d30ba59 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/com.ionic.keyboard/www/keyboard.js @@ -0,0 +1,39 @@ +cordova.define("com.ionic.keyboard.keyboard", function(require, exports, module) { +var argscheck = require('cordova/argscheck'), + utils = require('cordova/utils'), + exec = require('cordova/exec'); + + +var Keyboard = function() { +}; + +Keyboard.hideKeyboardAccessoryBar = function(hide) { + exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]); +}; + +Keyboard.close = function() { + exec(null, null, "Keyboard", "close", []); +}; + +Keyboard.show = function() { + exec(null, null, "Keyboard", "show", []); +}; + +Keyboard.disableScroll = function(disable) { + exec(null, null, "Keyboard", "disableScroll", [disable]); +}; + +/* +Keyboard.styleDark = function(dark) { + exec(null, null, "Keyboard", "styleDark", [dark]); +}; +*/ + +Keyboard.isVisible = false; + +module.exports = Keyboard; + + + + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/console-via-logger.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/console-via-logger.js new file mode 100644 index 00000000..0ce8cea8 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/console-via-logger.js @@ -0,0 +1,189 @@ +cordova.define("cordova-plugin-console.console", function(require, exports, module) { /* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +//------------------------------------------------------------------------------ + +var logger = require("./logger"); +var utils = require("cordova/utils"); + +//------------------------------------------------------------------------------ +// object that we're exporting +//------------------------------------------------------------------------------ +var console = module.exports; + +//------------------------------------------------------------------------------ +// copy of the original console object +//------------------------------------------------------------------------------ +var WinConsole = window.console; + +//------------------------------------------------------------------------------ +// whether to use the logger +//------------------------------------------------------------------------------ +var UseLogger = false; + +//------------------------------------------------------------------------------ +// Timers +//------------------------------------------------------------------------------ +var Timers = {}; + +//------------------------------------------------------------------------------ +// used for unimplemented methods +//------------------------------------------------------------------------------ +function noop() {} + +//------------------------------------------------------------------------------ +// used for unimplemented methods +//------------------------------------------------------------------------------ +console.useLogger = function (value) { + if (arguments.length) UseLogger = !!value; + + if (UseLogger) { + if (logger.useConsole()) { + throw new Error("console and logger are too intertwingly"); + } + } + + return UseLogger; +}; + +//------------------------------------------------------------------------------ +console.log = function() { + if (logger.useConsole()) return; + logger.log.apply(logger, [].slice.call(arguments)); +}; + +//------------------------------------------------------------------------------ +console.error = function() { + if (logger.useConsole()) return; + logger.error.apply(logger, [].slice.call(arguments)); +}; + +//------------------------------------------------------------------------------ +console.warn = function() { + if (logger.useConsole()) return; + logger.warn.apply(logger, [].slice.call(arguments)); +}; + +//------------------------------------------------------------------------------ +console.info = function() { + if (logger.useConsole()) return; + logger.info.apply(logger, [].slice.call(arguments)); +}; + +//------------------------------------------------------------------------------ +console.debug = function() { + if (logger.useConsole()) return; + logger.debug.apply(logger, [].slice.call(arguments)); +}; + +//------------------------------------------------------------------------------ +console.assert = function(expression) { + if (expression) return; + + var message = logger.format.apply(logger.format, [].slice.call(arguments, 1)); + console.log("ASSERT: " + message); +}; + +//------------------------------------------------------------------------------ +console.clear = function() {}; + +//------------------------------------------------------------------------------ +console.dir = function(object) { + console.log("%o", object); +}; + +//------------------------------------------------------------------------------ +console.dirxml = function(node) { + console.log(node.innerHTML); +}; + +//------------------------------------------------------------------------------ +console.trace = noop; + +//------------------------------------------------------------------------------ +console.group = console.log; + +//------------------------------------------------------------------------------ +console.groupCollapsed = console.log; + +//------------------------------------------------------------------------------ +console.groupEnd = noop; + +//------------------------------------------------------------------------------ +console.time = function(name) { + Timers[name] = new Date().valueOf(); +}; + +//------------------------------------------------------------------------------ +console.timeEnd = function(name) { + var timeStart = Timers[name]; + if (!timeStart) { + console.warn("unknown timer: " + name); + return; + } + + var timeElapsed = new Date().valueOf() - timeStart; + console.log(name + ": " + timeElapsed + "ms"); +}; + +//------------------------------------------------------------------------------ +console.timeStamp = noop; + +//------------------------------------------------------------------------------ +console.profile = noop; + +//------------------------------------------------------------------------------ +console.profileEnd = noop; + +//------------------------------------------------------------------------------ +console.count = noop; + +//------------------------------------------------------------------------------ +console.exception = console.log; + +//------------------------------------------------------------------------------ +console.table = function(data, columns) { + console.log("%o", data); +}; + +//------------------------------------------------------------------------------ +// return a new function that calls both functions passed as args +//------------------------------------------------------------------------------ +function wrappedOrigCall(orgFunc, newFunc) { + return function() { + var args = [].slice.call(arguments); + try { orgFunc.apply(WinConsole, args); } catch (e) {} + try { newFunc.apply(console, args); } catch (e) {} + }; +} + +//------------------------------------------------------------------------------ +// For every function that exists in the original console object, that +// also exists in the new console object, wrap the new console method +// with one that calls both +//------------------------------------------------------------------------------ +for (var key in console) { + if (typeof WinConsole[key] == "function") { + console[key] = wrappedOrigCall(WinConsole[key], console[key]); + } +} + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/logger.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/logger.js new file mode 100644 index 00000000..7a9a75d3 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-console/www/logger.js @@ -0,0 +1,357 @@ +cordova.define("cordova-plugin-console.logger", function(require, exports, module) { /* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +//------------------------------------------------------------------------------ +// The logger module exports the following properties/functions: +// +// LOG - constant for the level LOG +// ERROR - constant for the level ERROR +// WARN - constant for the level WARN +// INFO - constant for the level INFO +// DEBUG - constant for the level DEBUG +// logLevel() - returns current log level +// logLevel(value) - sets and returns a new log level +// useConsole() - returns whether logger is using console +// useConsole(value) - sets and returns whether logger is using console +// log(message,...) - logs a message at level LOG +// error(message,...) - logs a message at level ERROR +// warn(message,...) - logs a message at level WARN +// info(message,...) - logs a message at level INFO +// debug(message,...) - logs a message at level DEBUG +// logLevel(level,message,...) - logs a message specified level +// +//------------------------------------------------------------------------------ + +var logger = exports; + +var exec = require('cordova/exec'); +var utils = require('cordova/utils'); + +var UseConsole = false; +var UseLogger = true; +var Queued = []; +var DeviceReady = false; +var CurrentLevel; + +var originalConsole = console; + +/** + * Logging levels + */ + +var Levels = [ + "LOG", + "ERROR", + "WARN", + "INFO", + "DEBUG" +]; + +/* + * add the logging levels to the logger object and + * to a separate levelsMap object for testing + */ + +var LevelsMap = {}; +for (var i=0; i 0){ + formatArgs.unshift(fmtString); // add formatString + } + + var message = logger.format.apply(logger.format, formatArgs); + + if (LevelsMap[level] === null) { + throw new Error("invalid logging level: " + level); + } + + if (LevelsMap[level] > CurrentLevel) return; + + // queue the message if not yet at deviceready + if (!DeviceReady && !UseConsole) { + Queued.push([level, message]); + return; + } + + // Log using the native logger if that is enabled + if (UseLogger) { + exec(null, null, "Console", "logLevel", [level, message]); + } + + // Log using the console if that is enabled + if (UseConsole) { + // make sure console is not using logger + if (console.useLogger()) { + throw new Error("console and logger are too intertwingly"); + } + + // log to the console + switch (level) { + case logger.LOG: originalConsole.log(message); break; + case logger.ERROR: originalConsole.log("ERROR: " + message); break; + case logger.WARN: originalConsole.log("WARN: " + message); break; + case logger.INFO: originalConsole.log("INFO: " + message); break; + case logger.DEBUG: originalConsole.log("DEBUG: " + message); break; + } + } +}; + + +/** + * Formats a string and arguments following it ala console.log() + * + * Any remaining arguments will be appended to the formatted string. + * + * for rationale, see FireBug's Console API: + * http://getfirebug.com/wiki/index.php/Console_API + */ +logger.format = function(formatString, args) { + return __format(arguments[0], [].slice.call(arguments,1)).join(' '); +}; + + +//------------------------------------------------------------------------------ +/** + * Formats a string and arguments following it ala vsprintf() + * + * format chars: + * %j - format arg as JSON + * %o - format arg as JSON + * %c - format arg as '' + * %% - replace with '%' + * any other char following % will format it's + * arg via toString(). + * + * Returns an array containing the formatted string and any remaining + * arguments. + */ +function __format(formatString, args) { + if (formatString === null || formatString === undefined) return [""]; + if (arguments.length == 1) return [formatString.toString()]; + + if (typeof formatString != "string") + formatString = formatString.toString(); + + var pattern = /(.*?)%(.)(.*)/; + var rest = formatString; + var result = []; + + while (args.length) { + var match = pattern.exec(rest); + if (!match) break; + + var arg = args.shift(); + rest = match[3]; + result.push(match[1]); + + if (match[2] == '%') { + result.push('%'); + args.unshift(arg); + continue; + } + + result.push(__formatted(arg, match[2])); + } + + result.push(rest); + + var remainingArgs = [].slice.call(args); + remainingArgs.unshift(result.join('')); + return remainingArgs; +} + +function __formatted(object, formatChar) { + + try { + switch(formatChar) { + case 'j': + case 'o': return JSON.stringify(object); + case 'c': return ''; + } + } + catch (e) { + return "error JSON.stringify()ing argument: " + e; + } + + if ((object === null) || (object === undefined)) { + return Object.prototype.toString.call(object); + } + + return object.toString(); +} + + +//------------------------------------------------------------------------------ +// when deviceready fires, log queued messages +logger.__onDeviceReady = function() { + if (DeviceReady) return; + + DeviceReady = true; + + for (var i=0; i 0) { + opt.maximumAge = options.maximumAge; + } + if (options.enableHighAccuracy !== undefined) { + opt.enableHighAccuracy = options.enableHighAccuracy; + } + if (options.timeout !== undefined && !isNaN(options.timeout)) { + if (options.timeout < 0) { + opt.timeout = 0; + } else { + opt.timeout = options.timeout; + } + } + } + + return opt; +} + +// Returns a timeout failure, closed over a specified timeout value and error callback. +function createTimeout(errorCallback, timeout) { + var t = setTimeout(function() { + clearTimeout(t); + t = null; + errorCallback({ + code:PositionError.TIMEOUT, + message:"Position retrieval timed out." + }); + }, timeout); + return t; +} + +var geolocation = { + lastPosition:null, // reference to last known (cached) position returned + /** + * Asynchronously acquires the current position. + * + * @param {Function} successCallback The function to call when the position data is available + * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL) + * @param {PositionOptions} options The options for getting the position data. (OPTIONAL) + */ + getCurrentPosition:function(successCallback, errorCallback, options) { + argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments); + options = parseParameters(options); + + // Timer var that will fire an error callback if no position is retrieved from native + // before the "timeout" param provided expires + var timeoutTimer = {timer:null}; + + var win = function(p) { + clearTimeout(timeoutTimer.timer); + if (!(timeoutTimer.timer)) { + // Timeout already happened, or native fired error callback for + // this geo request. + // Don't continue with success callback. + return; + } + var pos = new Position( + { + latitude:p.latitude, + longitude:p.longitude, + altitude:p.altitude, + accuracy:p.accuracy, + heading:p.heading, + velocity:p.velocity, + altitudeAccuracy:p.altitudeAccuracy + }, + (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp))) + ); + geolocation.lastPosition = pos; + successCallback(pos); + }; + var fail = function(e) { + clearTimeout(timeoutTimer.timer); + timeoutTimer.timer = null; + var err = new PositionError(e.code, e.message); + if (errorCallback) { + errorCallback(err); + } + }; + + // Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just + // fire the success callback with the cached position. + if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) { + successCallback(geolocation.lastPosition); + // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object. + } else if (options.timeout === 0) { + fail({ + code:PositionError.TIMEOUT, + message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter." + }); + // Otherwise we have to call into native to retrieve a position. + } else { + if (options.timeout !== Infinity) { + // If the timeout value was not set to Infinity (default), then + // set up a timeout function that will fire the error callback + // if no successful position was retrieved before timeout expired. + timeoutTimer.timer = createTimeout(fail, options.timeout); + } else { + // This is here so the check in the win function doesn't mess stuff up + // may seem weird but this guarantees timeoutTimer is + // always truthy before we call into native + timeoutTimer.timer = true; + } + exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]); + } + return timeoutTimer; + }, + /** + * Asynchronously watches the geolocation for changes to geolocation. When a change occurs, + * the successCallback is called with the new location. + * + * @param {Function} successCallback The function to call each time the location data is available + * @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL) + * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL) + * @return String The watch id that must be passed to #clearWatch to stop watching. + */ + watchPosition:function(successCallback, errorCallback, options) { + argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments); + options = parseParameters(options); + + var id = utils.createUUID(); + + // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition + timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options); + + var fail = function(e) { + clearTimeout(timers[id].timer); + var err = new PositionError(e.code, e.message); + if (errorCallback) { + errorCallback(err); + } + }; + + var win = function(p) { + clearTimeout(timers[id].timer); + if (options.timeout !== Infinity) { + timers[id].timer = createTimeout(fail, options.timeout); + } + var pos = new Position( + { + latitude:p.latitude, + longitude:p.longitude, + altitude:p.altitude, + accuracy:p.accuracy, + heading:p.heading, + velocity:p.velocity, + altitudeAccuracy:p.altitudeAccuracy + }, + (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp))) + ); + geolocation.lastPosition = pos; + successCallback(pos); + }; + + exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]); + + return id; + }, + /** + * Clears the specified heading watch. + * + * @param {String} id The ID of the watch returned from #watchPosition + */ + clearWatch:function(id) { + if (id && timers[id] !== undefined) { + clearTimeout(timers[id].timer); + timers[id].timer = false; + exec(null, null, "Geolocation", "clearWatch", [id]); + } + } +}; + +module.exports = geolocation; + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/Connection.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/Connection.js new file mode 100644 index 00000000..1450e953 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/Connection.js @@ -0,0 +1,36 @@ +cordova.define("cordova-plugin-network-information.Connection", function(require, exports, module) { /* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/** + * Network status + */ +module.exports = { + UNKNOWN: "unknown", + ETHERNET: "ethernet", + WIFI: "wifi", + CELL_2G: "2g", + CELL_3G: "3g", + CELL_4G: "4g", + CELL:"cellular", + NONE: "none" +}; + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/network.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/network.js new file mode 100644 index 00000000..bfac2e3f --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-network-information/www/network.js @@ -0,0 +1,93 @@ +cordova.define("cordova-plugin-network-information.network", function(require, exports, module) { /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var exec = require('cordova/exec'), + cordova = require('cordova'), + channel = require('cordova/channel'), + utils = require('cordova/utils'); + +// Link the onLine property with the Cordova-supplied network info. +// This works because we clobber the navigator object with our own +// object in bootstrap.js. +// Browser platform do not need to define this property, because +// it is already supported by modern browsers +if (cordova.platformId !== 'browser' && typeof navigator != 'undefined') { + utils.defineGetter(navigator, 'onLine', function() { + return this.connection.type != 'none'; + }); +} + +function NetworkConnection() { + this.type = 'unknown'; +} + +/** + * Get connection info + * + * @param {Function} successCallback The function to call when the Connection data is available + * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL) + */ +NetworkConnection.prototype.getInfo = function(successCallback, errorCallback) { + exec(successCallback, errorCallback, "NetworkStatus", "getConnectionInfo", []); +}; + +var me = new NetworkConnection(); +var timerId = null; +var timeout = 500; + +channel.createSticky('onCordovaConnectionReady'); +channel.waitForInitialization('onCordovaConnectionReady'); + +channel.onCordovaReady.subscribe(function() { + me.getInfo(function(info) { + me.type = info; + if (info === "none") { + // set a timer if still offline at the end of timer send the offline event + timerId = setTimeout(function(){ + cordova.fireDocumentEvent("offline"); + timerId = null; + }, timeout); + } else { + // If there is a current offline event pending clear it + if (timerId !== null) { + clearTimeout(timerId); + timerId = null; + } + cordova.fireDocumentEvent("online"); + } + + // should only fire this once + if (channel.onCordovaConnectionReady.state !== 2) { + channel.onCordovaConnectionReady.fire(); + } + }, + function (e) { + // If we can't get the network info we should still tell Cordova + // to fire the deviceready event. + if (channel.onCordovaConnectionReady.state !== 2) { + channel.onCordovaConnectionReady.fire(); + } + console.log("Error initializing Network Connection: " + e); + }); +}); + +module.exports = me; + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-splashscreen/www/splashscreen.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-splashscreen/www/splashscreen.js new file mode 100644 index 00000000..0e6a10af --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-splashscreen/www/splashscreen.js @@ -0,0 +1,35 @@ +cordova.define("cordova-plugin-splashscreen.SplashScreen", function(require, exports, module) { /* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var exec = require('cordova/exec'); + +var splashscreen = { + show:function() { + exec(null, null, "SplashScreen", "show", []); + }, + hide:function() { + exec(null, null, "SplashScreen", "hide", []); + } +}; + +module.exports = splashscreen; + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js new file mode 100644 index 00000000..aa82acf6 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js @@ -0,0 +1,117 @@ +cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { var cordova = require('cordova'); + +function SocialSharing() { +} + +// Override this method (after deviceready) to set the location where you want the iPad popup arrow to appear. +// If not overridden with different values, the popup is not used. Example: +// +// window.plugins.socialsharing.iPadPopupCoordinates = function() { +// return "100,100,200,300"; +// }; +SocialSharing.prototype.iPadPopupCoordinates = function () { + // left,top,width,height + return "-1,-1,-1,-1"; +}; + +SocialSharing.prototype.setIPadPopupCoordinates = function (coords) { + // left,top,width,height + cordova.exec(function() {}, this._getErrorCallback(function() {}, "setIPadPopupCoordinates"), "SocialSharing", "setIPadPopupCoordinates", [coords]); +}; + +SocialSharing.prototype.available = function (callback) { + cordova.exec(function (avail) { + callback(avail ? true : false); + }, null, "SocialSharing", "available", []); +}; + +SocialSharing.prototype.share = function (message, subject, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SocialSharing", "share", [message, subject, this._asArray(fileOrFileArray), url]); +}; + +SocialSharing.prototype.shareViaTwitter = function (message, file /* multiple not allowed by twitter */, url, successCallback, errorCallback) { + var fileArray = this._asArray(file); + var ecb = this._getErrorCallback(errorCallback, "shareViaTwitter"); + if (fileArray.length > 1) { + ecb("shareViaTwitter supports max one file"); + } else { + cordova.exec(successCallback, ecb, "SocialSharing", "shareViaTwitter", [message, null, fileArray, url]); + } +}; + +SocialSharing.prototype.shareViaFacebook = function (message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaFacebook"), "SocialSharing", "shareViaFacebook", [message, null, this._asArray(fileOrFileArray), url]); +}; + +SocialSharing.prototype.shareViaFacebookWithPasteMessageHint = function (message, fileOrFileArray, url, pasteMessageHint, successCallback, errorCallback) { + pasteMessageHint = pasteMessageHint || "If you like you can paste a message from your clipboard"; + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaFacebookWithPasteMessageHint"), "SocialSharing", "shareViaFacebookWithPasteMessageHint", [message, null, this._asArray(fileOrFileArray), url, pasteMessageHint]); +}; + +SocialSharing.prototype.shareViaWhatsApp = function (message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url]); +}; + +SocialSharing.prototype.shareViaSMS = function (options, phonenumbers, successCallback, errorCallback) { + var opts = options; + if (typeof options == "string") { + opts = {"message":options}; // for backward compatibility as the options param used to be the message + } + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaSMS"), "SocialSharing", "shareViaSMS", [opts, phonenumbers]); +}; + +SocialSharing.prototype.shareViaEmail = function (message, subject, toArray, ccArray, bccArray, fileOrFileArray, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaEmail"), "SocialSharing", "shareViaEmail", [message, subject, this._asArray(toArray), this._asArray(ccArray), this._asArray(bccArray), this._asArray(fileOrFileArray)]); +}; + +SocialSharing.prototype.canShareVia = function (via, message, subject, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "canShareVia"), "SocialSharing", "canShareVia", [message, subject, this._asArray(fileOrFileArray), url, via]); +}; + +SocialSharing.prototype.canShareViaEmail = function (successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "canShareViaEmail"), "SocialSharing", "canShareViaEmail", []); +}; + +SocialSharing.prototype.shareViaInstagram = function (message, fileOrFileArray, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaInstagram"), "SocialSharing", "shareViaInstagram", [message, null, this._asArray(fileOrFileArray), null]); +}; + +SocialSharing.prototype.shareVia = function (via, message, subject, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareVia"), "SocialSharing", "shareVia", [message, subject, this._asArray(fileOrFileArray), url, via]); +}; + +SocialSharing.prototype.saveToPhotoAlbum = function (fileOrFileArray, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "saveToPhotoAlbum"), "SocialSharing", "saveToPhotoAlbum", [this._asArray(fileOrFileArray)]); +}; + +SocialSharing.prototype._asArray = function (param) { + if (param == null) { + param = []; + } else if (typeof param === 'string') { + param = new Array(param); + } + return param; +}; + +SocialSharing.prototype._getErrorCallback = function (ecb, functionName) { + if (typeof ecb === 'function') { + return ecb; + } else { + return function (result) { + console.log("The injected error callback of '" + functionName + "' received: " + JSON.stringify(result)); + } + } +}; + +SocialSharing.install = function () { + if (!window.plugins) { + window.plugins = {}; + } + + window.plugins.socialsharing = new SocialSharing(); + return window.plugins.socialsharing; +}; + +cordova.addConstructor(SocialSharing.install); + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/phonegap-plugin-push/www/push.js b/StoneIsland/platforms/ios/platform_www/plugins/phonegap-plugin-push/www/push.js new file mode 100644 index 00000000..7aa30fd7 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/phonegap-plugin-push/www/push.js @@ -0,0 +1,231 @@ +cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) { /* global cordova:false */ + +/*! + * Module dependencies. + */ + +var exec = cordova.require('cordova/exec'); + +/** + * PushNotification constructor. + * + * @param {Object} options to initiate Push Notifications. + * @return {PushNotification} instance that can be monitored and cancelled. + */ + +var PushNotification = function(options) { + this._handlers = { + 'registration': [], + 'notification': [], + 'error': [] + }; + + // require options parameter + if (typeof options === 'undefined') { + throw new Error('The options argument is required.'); + } + + // store the options to this object instance + this.options = options; + + // triggered on registration and notification + var that = this; + var success = function(result) { + if (result && typeof result.registrationId !== 'undefined') { + that.emit('registration', result); + } else if (result && typeof result.callback !== 'undefined') { + var executeFunctionByName = function(functionName, context /*, args */) { + var args = Array.prototype.slice.call(arguments, 2); + var namespaces = functionName.split("."); + var func = namespaces.pop(); + for (var i = 0; i < namespaces.length; i++) { + context = context[namespaces[i]]; + } + return context[func].apply(context, args); + } + + executeFunctionByName(result.callback, window, result); + } else if (result) { + that.emit('notification', result); + } + }; + + // triggered on error + var fail = function(msg) { + var e = (typeof msg === 'string') ? new Error(msg) : msg; + that.emit('error', e); + }; + + // wait at least one process tick to allow event subscriptions + setTimeout(function() { + exec(success, fail, 'PushNotification', 'init', [options]); + }, 10); +}; + +/** + * Unregister from push notifications + */ + +PushNotification.prototype.unregister = function(successCallback, errorCallback, options) { + if (errorCallback == null) { errorCallback = function() {}} + + if (typeof errorCallback != "function") { + console.log("PushNotification.unregister failure: failure parameter not a function"); + return + } + + if (typeof successCallback != "function") { + console.log("PushNotification.unregister failure: success callback parameter must be a function"); + return + } + + exec(successCallback, errorCallback, "PushNotification", "unregister", [options]); +}; + +/** + * Call this to set the application icon badge + */ + +PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) { + if (errorCallback == null) { errorCallback = function() {}} + + if (typeof errorCallback != "function") { + console.log("PushNotification.setApplicationIconBadgeNumber failure: failure parameter not a function"); + return + } + + if (typeof successCallback != "function") { + console.log("PushNotification.setApplicationIconBadgeNumber failure: success callback parameter must be a function"); + return + } + + exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]); +}; + +/** + * Get the application icon badge + */ + +PushNotification.prototype.getApplicationIconBadgeNumber = function(successCallback, errorCallback) { + if (errorCallback == null) { errorCallback = function() {}} + + if (typeof errorCallback != "function") { + console.log("PushNotification.getApplicationIconBadgeNumber failure: failure parameter not a function"); + return + } + + if (typeof successCallback != "function") { + console.log("PushNotification.getApplicationIconBadgeNumber failure: success callback parameter must be a function"); + return + } + + exec(successCallback, errorCallback, "PushNotification", "getApplicationIconBadgeNumber", []); +}; + +/** + * Listen for an event. + * + * The following events are supported: + * + * - registration + * - notification + * - error + * + * @param {String} eventName to subscribe to. + * @param {Function} callback triggered on the event. + */ + +PushNotification.prototype.on = function(eventName, callback) { + if (this._handlers.hasOwnProperty(eventName)) { + this._handlers[eventName].push(callback); + } +}; + +/** + * Remove event listener. + * + * @param {String} eventName to match subscription. + * @param {Function} handle function associated with event. + */ + +PushNotification.prototype.off = function (eventName, handle) { + if (this._handlers.hasOwnProperty(eventName)) { + var handleIndex = this._handlers[eventName].indexOf(handle); + if (handleIndex >= 0) + this._handlers[eventName].splice(handleIndex, 1); + } +}; + +/** + * Emit an event. + * + * This is intended for internal use only. + * + * @param {String} eventName is the event to trigger. + * @param {*} all arguments are passed to the event listeners. + * + * @return {Boolean} is true when the event is triggered otherwise false. + */ + +PushNotification.prototype.emit = function() { + var args = Array.prototype.slice.call(arguments); + var eventName = args.shift(); + + if (!this._handlers.hasOwnProperty(eventName)) { + return false; + } + + for (var i = 0, length = this._handlers[eventName].length; i < length; i++) { + this._handlers[eventName][i].apply(undefined,args); + } + + return true; +}; + +PushNotification.prototype.finish = function(successCallback, errorCallback) { + if (successCallback == null) { successCallback = function() {}} + if (errorCallback == null) { errorCallback = function() {}} + + if (typeof successCallback != "function") { + console.log("finish failure: success callback parameter must be a function"); + return + } + + if (typeof errorCallback != "function") { + console.log("finish failure: failure parameter not a function"); + return + } + + exec(successCallback, errorCallback, 'PushNotification', 'finish', []); +} + +/*! + * Push Notification Plugin. + */ + +module.exports = { + /** + * Register for Push Notifications. + * + * This method will instantiate a new copy of the PushNotification object + * and start the registration process. + * + * @param {Object} options + * @return {PushNotification} instance + */ + + init: function(options) { + return new PushNotification(options); + }, + + /** + * PushNotification Object. + * + * Expose the PushNotification object for direct use + * and testing. Typically, you should use the + * .init helper method. + */ + + PushNotification: PushNotification +}; +}); diff --git a/StoneIsland/platforms/ios/www/cordova_plugins.js b/StoneIsland/platforms/ios/www/cordova_plugins.js index f3038524..d0aea848 100644 --- a/StoneIsland/platforms/ios/www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/www/cordova_plugins.js @@ -3,6 +3,7 @@ module.exports = [ { "file": "plugins/com.ionic.keyboard/www/keyboard.js", "id": "com.ionic.keyboard.keyboard", + "pluginId": "com.ionic.keyboard", "clobbers": [ "cordova.plugins.Keyboard" ] @@ -10,6 +11,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-console/www/logger.js", "id": "cordova-plugin-console.logger", + "pluginId": "cordova-plugin-console", "clobbers": [ "cordova.logger" ] @@ -17,6 +19,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-console/www/console-via-logger.js", "id": "cordova-plugin-console.console", + "pluginId": "cordova-plugin-console", "clobbers": [ "console" ] @@ -24,6 +27,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-device/www/device.js", "id": "cordova-plugin-device.device", + "pluginId": "cordova-plugin-device", "clobbers": [ "device" ] @@ -31,6 +35,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-dialogs/www/notification.js", "id": "cordova-plugin-dialogs.notification", + "pluginId": "cordova-plugin-dialogs", "merges": [ "navigator.notification" ] @@ -38,6 +43,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-geolocation/www/Coordinates.js", "id": "cordova-plugin-geolocation.Coordinates", + "pluginId": "cordova-plugin-geolocation", "clobbers": [ "Coordinates" ] @@ -45,6 +51,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-geolocation/www/PositionError.js", "id": "cordova-plugin-geolocation.PositionError", + "pluginId": "cordova-plugin-geolocation", "clobbers": [ "PositionError" ] @@ -52,6 +59,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-geolocation/www/Position.js", "id": "cordova-plugin-geolocation.Position", + "pluginId": "cordova-plugin-geolocation", "clobbers": [ "Position" ] @@ -59,6 +67,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-geolocation/www/geolocation.js", "id": "cordova-plugin-geolocation.geolocation", + "pluginId": "cordova-plugin-geolocation", "clobbers": [ "navigator.geolocation" ] @@ -66,6 +75,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-network-information/www/network.js", "id": "cordova-plugin-network-information.network", + "pluginId": "cordova-plugin-network-information", "clobbers": [ "navigator.connection", "navigator.network.connection" @@ -74,6 +84,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-network-information/www/Connection.js", "id": "cordova-plugin-network-information.Connection", + "pluginId": "cordova-plugin-network-information", "clobbers": [ "Connection" ] @@ -81,6 +92,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-splashscreen/www/splashscreen.js", "id": "cordova-plugin-splashscreen.SplashScreen", + "pluginId": "cordova-plugin-splashscreen", "clobbers": [ "navigator.splashscreen" ] @@ -88,6 +100,7 @@ module.exports = [ { "file": "plugins/phonegap-plugin-push/www/push.js", "id": "phonegap-plugin-push.PushNotification", + "pluginId": "phonegap-plugin-push", "clobbers": [ "PushNotification" ] @@ -95,6 +108,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", "id": "cordova-plugin-customurlscheme.LaunchMyApp", + "pluginId": "cordova-plugin-customurlscheme", "clobbers": [ "window.plugins.launchmyapp" ] @@ -102,6 +116,7 @@ module.exports = [ { "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", "id": "cordova-plugin-x-socialsharing.SocialSharing", + "pluginId": "cordova-plugin-x-socialsharing", "clobbers": [ "window.plugins.socialsharing" ] diff --git a/StoneIsland/platforms/ios/www/css/account.css b/StoneIsland/platforms/ios/www/css/account.css index 3c04e1b1..7e709197 100644 --- a/StoneIsland/platforms/ios/www/css/account.css +++ b/StoneIsland/platforms/ios/www/css/account.css @@ -51,6 +51,64 @@ display: block; } +#order_list { + width: calc(100vw - 40px); + position:relative; + margin:0 auto; + box-sizing:border-box; +} + +#order_list .list { + padding:15px 0; + position:relative; +} + +.images:after { + content:''; + width:calc(100% + 100px); + height:1px; + background:#bbb; + position:absolute; + bottom:0; + left:-50px; +} + +.details-container { + position:relative; + font-weight:bold; + letter-spacing:0.2px; + font-size:11px; + margin-bottom:10px; + width:100%; + box-sizing:border-box; +} + +.details-container .details { + position:absolute; + display:block; + bottom:0; + right:0; + box-sizing:border-box; +} + +.details-container .txt { + position:relative; + display:block; + bottom:0; + left:0; + box-sizing:border-box; +} + +.details-container .txt span { + display:block; + box-sizing:border-box; +} + +#orders .item img { + max-width:120px; + box-sizing:border-box; +} + .settings #settings { display: block } #settings { display: none; @@ -58,6 +116,8 @@ + + form h2 { text-align: center; margin: 0; @@ -223,7 +283,7 @@ input.switch:checked + label:after { } .container-fill { - min-height:40px; + min-height:50px; flex: 1; align-items: center; justify-content: center; @@ -272,7 +332,7 @@ input.switch:checked + label:after { width:calc(100vw - 10px); display:table; box-sizing:border-box; - margin:0 auto 5px; + margin:0 auto; } .checkbox-toggle { @@ -294,7 +354,7 @@ input.switch:checked + label:after { } .checkbox-row { - margin:12px 0; + margin:6px 0 0; box-sizing:border-box; } diff --git a/StoneIsland/platforms/ios/www/css/blogs.css b/StoneIsland/platforms/ios/www/css/blogs.css index 0b9f8eed..f18b27f8 100644 --- a/StoneIsland/platforms/ios/www/css/blogs.css +++ b/StoneIsland/platforms/ios/www/css/blogs.css @@ -105,7 +105,7 @@ /* NOTE: optional arrows */ -.gallery-multiple-images::before { +.gallery-left { border:1px solid black; background:rgba(255,255,255,1); background-image:url(../img/left-arrow.png); @@ -114,7 +114,7 @@ background-position:center; width:15px; height:30px; - top:50%; + top:26vh; content:''; transform:translateY(-50%); transform-origin:top right; @@ -126,7 +126,7 @@ display:block; } -.gallery-multiple-images::after { +.gallery-right { border:1px solid black; background:rgba(255,255,255,1); background-image:url(../img/right-arrow.png); @@ -135,7 +135,7 @@ background-position:center; width:15px; height:30px; - top:50%; + top:26vh; content:''; transform:translateY(-50%); transform-origin:top right; @@ -246,7 +246,6 @@ ul.links { } #archive .menu .items { width: 100%; - } #archive .menu .item:first-of-type { border-top: 1px solid black; @@ -256,9 +255,9 @@ ul.links { text-align: center; border-bottom: 1px solid black; background: white; - padding:12px 0; - font-size:14px; - letter-spacing:0.7px + padding:12px 0; + font-size:14px; + letter-spacing:0.7px } #archive .scroll { @@ -268,7 +267,8 @@ ul.links { #archive .row { position: relative; min-height: 80vh; - perspective: 500; + -webkit-perspective: 500px; + perspective: 500px; } #archive .row .image { width: 100%; height: 100%; @@ -276,6 +276,12 @@ ul.links { background-size: 80% auto; background-position: center center; } +#archive .row.loading .image { + background-repeat: no-repeat; + background-size: auto auto; + background-position: center center; + background-image: url('../img/spinner.gif') !important; +} #archive .row .text { width: 80%; } diff --git a/StoneIsland/platforms/ios/www/css/cart.css b/StoneIsland/platforms/ios/www/css/cart.css index 52b2a4cb..9fbc54b3 100644 --- a/StoneIsland/platforms/ios/www/css/cart.css +++ b/StoneIsland/platforms/ios/www/css/cart.css @@ -19,7 +19,7 @@ position:relative; } .summary_step, .shipping_step { -border-right: 1px solid #bbb + border-right: 1px solid #bbb } #cart.summary .summary_step, @@ -32,8 +32,9 @@ border-right: 1px solid #bbb #cart_shipping, #cart_payment, #cart_confirm, -#cart_thanks { - height: calc(100vh - 195px); +#cart_thanks, +#cart_error { + height: calc(100vh - 187px); overflow: hidden; position: relative; } @@ -71,10 +72,24 @@ border-right: 1px solid #bbb display: none; } -#cart.thanks #cart_thanks { display: block } #cart_thanks { display: none; } +#cart_error { + display: none; +} +#cart.thanks #cart_thanks, +#cart.error #cart_error { + display: flex; + align-items: center; + justify-content: center; +} +#cart .copy { + min-height:50px; + max-width: 50%; + text-align: center; + font-size: 18px; +} .summary-container { top:0px; @@ -87,6 +102,7 @@ border-right: 1px solid #bbb #cart h3 { padding-left: 5px; + font-size:12px; } .cart_item_row { @@ -112,10 +128,10 @@ box-sizing:border-box .cart_item_image img { max-width:calc(33vw - 25px); +padding-right:30px; } .cart_item_info { -padding-left:30px; padding-bottom:5px; position:relative; width:100% @@ -152,69 +168,109 @@ transform:rotate(45deg) translateX(-50%) translateY(-50%) } .cart_item_price .remove:before { -content:''; -width:1px; -height:22px; -background:#bbb; -position:absolute; -top:50%; -left:50%; -z-index:3; -transform-origin:top left; -transform:rotate(-45deg) translateX(-50%) translateY(-50%) + content:''; + width:1px; + height:22px; + background:#bbb; + position:absolute; + top:50%; + left:50%; + z-index:3; + transform-origin:top left; + transform:rotate(-45deg) translateX(-50%) translateY(-50%) } .cart_item_price .price { -font-size:11px; -font-weight:bold; -display:block + font-size:11px; + font-weight:bold; + display:block } .cart_item_info .sku { -font-size:10px; -font-weight:bold; -display:block + font-size:10px; + font-weight:bold; + display:block } .cart_item_info .title { -font-size:10px; -font-weight:bold; -display:block; -line-height:12px; -text-transform:uppercase; + font-size:10px; + font-weight:bold; + display:block; + line-height:12px; + text-transform:uppercase; } .cart_item_info .type { -font-size:10px; -font-weight:bold; -display:block; -text-transform:capitalize; + font-size:10px; + font-weight:bold; + display:block; + text-transform:capitalize; } .cart_item_info .meta { -padding-top:5px; -letter-spacing:.75px; -font-size:8px; + padding-top:5px; + letter-spacing:.75px; + font-size:8px; +} + +.order_section .rows { + width:calc(100vw - 30px); + margin:0 auto; +} + +.order_section h2 { + width:calc(100vw - 30px); + margin:15px auto; + text-decoration:underline; + font-size:11px; +} + +.order_section_container { + width:calc(100vw - 30px); + margin:15px auto 2px; } .cart-summary { -width:calc(100vw - 30px); -margin:0 auto; -display:table; -color:#bbb; -font-size:11px; + width:calc(100vw - 30px); + margin:0 auto; + display:table; + color:#bbb; + font-size:11px; } .cart-summary-row { -display:table-row; + display:table-row; } .cart-summary span { -display:table-cell; -padding-top:20px; -vertical-align:bottom; + display:table-cell; + padding-top:20px; + vertical-align:bottom; +} + +.order_section .cart-summary-row span { + padding-top:1px; } +.order_section .cart-summary { + padding-top:15px; +} + +.order_section .cart-summary-row:last-child > span { + padding-top:15px!important; + font-weight:bold!important; +} + +.order_section .cart-summary .cart-summary-row span:nth-of-type(2) { + color:#000; +} + +#orders .order_section { + padding-bottom: 16px; + border-bottom: 1px solid #bbb; +} + + .cart-summary-row span:not(.label) { text-align:right } @@ -289,5 +345,14 @@ color:#000; } #cart_shipping h3 { -margin-left:5px; + margin-left:5px; + margin-bottom:6px; } + +#cart_shipping input:first-child { + margin-top:10px +} + +#cart_shipping .half-input input { + margin-top:0px +} \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/css/nav.css b/StoneIsland/platforms/ios/www/css/nav.css index 61834f8b..a75fb35c 100644 --- a/StoneIsland/platforms/ios/www/css/nav.css +++ b/StoneIsland/platforms/ios/www/css/nav.css @@ -142,16 +142,16 @@ padding-bottom:0px; width: 200px; padding: 50px; text-align: center; - font-size: 20px; + font-size: 17px; } #intro #compass { pointer-events: none; background-image: url(../img/compass-logo.png); background-repeat: no-repeat; background-position: center center; - background-size: 250px 250px; - width: 250px; - height: 250px; + background-size: 230px 230px; + width: 230px; + height: 230px; padding: 0px; border-radius: 50%; } @@ -334,3 +334,8 @@ h1 { letter-spacing: 1px; font-weight: bold; } + +.msg { + padding: 20px; + display: inline-block; +} diff --git a/StoneIsland/platforms/ios/www/css/products.css b/StoneIsland/platforms/ios/www/css/products.css index 78d02811..82c7c36c 100644 --- a/StoneIsland/platforms/ios/www/css/products.css +++ b/StoneIsland/platforms/ios/www/css/products.css @@ -181,46 +181,9 @@ } -#product #gallery::before { - border:1px solid black; - background:rgba(255,255,255,1); - background-image:url(../img/left-arrow.png); - background-size:5px 10px; - background-repeat:no-repeat; - background-position:center; - width:15px; - height:30px; - top:50%; - content:''; - transform:translateY(-50%); - transform-origin:top right; - left:20px; - font-size:18px; - padding:3px 3px 3px 1px; - z-index:999; - position:absolute; - display:block; -} - -#product #gallery::after { - border:1px solid black; - background:rgba(255,255,255,1); - background-image:url(../img/right-arrow.png); - background-size:5px 10px; - background-repeat:no-repeat; - background-position:center; - width:15px; - height:30px; - top:50%; - content:''; - transform:translateY(-50%); - transform-origin:top right; - right:20px; - font-size:18px; - padding:3px 1px 3px 3px; - z-index:999; - position:absolute; - display:block; +#product .gallery-prev, +#product .gallery-next { + top: 26vh; } #product .content .body { diff --git a/StoneIsland/platforms/ios/www/db.json b/StoneIsland/platforms/ios/www/db.json new file mode 100644 index 00000000..65e63d9c --- /dev/null +++ b/StoneIsland/platforms/ios/www/db.json @@ -0,0 +1,485 @@ +{ + "story": [ + { + "id": "philosophy", + "title": "Philosophy", + "image": { + "uri": "http://cdn3.yoox.biz/stoneisland/wp-content/uploads/2013/11/philosophy1.jpg", + "caption": "" + }, + "body": "A culture of research, experimentation, function and use are the matrixes that have always defined Stone Island: the sportswear brand established in 1982, designed to become a symbol of extreme research on fibers and textiles, applied to an innovative design. Season after season, it is through the study of form and the “manipulation” of the matter that Stone Island has found its own language with the aim of establishing new boundaries in the world of garment making. \r\n\r\nThe study of uniforms and of work wear, its evolution according to new requirements of use, has become Stone Island’s observation post for defining a project in which the clothing item’s function is never just aesthetic.\r\n\r\nAn ongoing investigation, thorough and without frontiers, on the processing and ennobling of fibers and textiles, leading to discover materials and production techniques never used before in the clothing industry.\r\n\r\nJackets constructed in nylon monofilament, deriving from the water filtering technology. Highly reflective or thermo-sensitive fabrics, changing color with the variation of temperature. Featherweight polyester cloth vacuum- coated with a 100% stainless steel film used in aviation technology to protect the on-board computers. Non-woven materials, Kevlar® and polyester felt, rhomboidal nets in polyester used in the construction industry and coated in polyurethane. These are some examples of materials conceived by Stone Island philosophy.\r\n\r\nStone Island’s strength is also based on the unique ability to intervene on the finished item, through the continuous tests on dyeing and treatments carried out in the Sportswear Company’s laboratory of color. A department able to combine advanced technology, experience and human capacity and that has developed more than 60,000 different recipes of dyes throughout the years.\r\n\r\nAll the accumulated knowledge and experience, an inalienable heritage, on which great part of Stone Island’s know-how is based, is kept in the historical archive that collects the trial tests, and the recipes for textile dyeing and handling that have been developed by all those people who have worked on this project with passion.", + "__index": "0", + "dateCreated": "Thu, 05 Nov 2015 00:24:44 GMT" + }, + { + "id": "history", + "title": "History", + "image": { + "uri": "https://ltho.s3.amazonaws.com/ce68408c-34b3-40ca-8ddf-c10cd1412c5f.jpg", + "caption": "" + }, + "body": "Stone Island, the Italian brand that reinvented the concept of casual wear, was founded in 1982 out of the passion and brilliant research into textile finishing performed by its creator and art director, intellectual from Bologna, Massimo Osti. It was Osti, in the mid-Seventies, who researched thousands of uniforms and pieces of work clothing and catalogued their functional characteristics. In Ravarino, in the province of Modena, he created a company whose hub was a full-scale center of research into materials and treatments became a sophisticated laboratory for garment and experimental dyeing.\r\n\r\nThe story of Stone Island began, almost by chance, with research into a special material, a thick truck tarpaulin, the outstanding feature of which was that it had been resin-treated in red on one side and blue on the other. The first prototype was too stiff, so it was washed for a long period in water with pumice stones to break down the structure of the material. The result was surprising, a worn-look garment with great appeal. It was therefore decided to create seven jackets in that unique fabric called Tela Stella, and to give this product a name. The strong identity of the project called for an important name, which was identified by analyzing the most commonly occurring words in Joseph Conrad’s novels: the words Stone and Island were chosen.\r\n\r\nStone Island has a marine feel, conjuring up old oilskins corroded by the sea and a military feel, which is drawn from the fund of research completed until that time. The name also evokes a love of the sea and that first treatment selected to “process” the garments. The badge, the detachable fabric label that has distinguished Stone Island garments since the first season, showed a Compass Rose, displayed like a military badge.\r\n\r\nThe reaction is immediate. Stone Island became a success phenomenon, with no set plan or marketing research behind it: a uniquely Italian mix of creativity, intuition and entrepreneurial spirit. A star was born.", + "__index": "1", + "dateCreated": "Thu, 05 Nov 2015 00:27:25 GMT" + }, + { + "id": "carlo-rivetti", + "title": "Carlo Rivetti", + "image": { + "uri": "https://ltho.s3.amazonaws.com/2fe16d85-e85f-4f12-ae55-72622c8efafd.jpg", + "caption": "" + }, + "body": "Lorem ipsum dolor sit amet, has eu oblique rationibus, at sea salutandi expetendis reformidans. Vix iuvaret accumsan deseruisse at, at liber dolor voluptaria pro. Sit assum dicunt menandri in, dolorem postulant erroribus at per. Nemore virtute cu eos, no duo partem luptatum. Reque voluptua dissentiunt vel an, usu vidit feugiat cotidieque te.\r\n\r\nNisl quaerendum cum ei. Oratio conceptam intellegam no usu, pri ancillae suavitate ut. Nam ad maiorum noluisse corrumpit, vis in nostro iracundia vituperata, nec ad noster assueverit. Ex sit elitr ancillae, moderatius incorrupte complectitur eum an. At quo diam laudem adipiscing, alii nibh semper nec ad, eos at graecis delicatissimi. Urbanitas conceptam consequuntur in cum. Ut periculis maluisset scribentur vel, et debitis copiosae officiis mel.\r\n\r\nPlatonem suavitate ullamcorper eu vim, usu erat accumsan gloriatur an. Ne vix dico facilisis, an sit harum dicit aperiam. Invidunt intellegam dissentiet mel no, duo aperiam malorum elaboraret id, has in volumus officiis. Case dolores te pri, reque movet dolores eos no, iuvaret feugait consectetuer vim an.\r\n\r\nSed fierent facilisis ei. Quem dicit option ex vix. Ne invidunt efficiantur mea. Meliore assentior vituperata eu mei, odio verear vis et, ad sale denique vim. Mea ut ceteros fastidii splendide, diceret fuisset eu mel, vix no volumus efficiantur.\r\n\r\nHas in erat choro fabulas. No brute option vim, corrumpit torquatos sed ad, ex tota phaedrum pri. Paulo dignissim moderatius eu mei, duo ea tempor tamquam deserunt. Mea indoctum argumentum disputationi an. Mea et delicata consequuntur, duo ea choro homero. Sea ad modo fabulas omittam, vim id graece tibique efficiendi. Te cibo ridens quo, ne utroque democritum has, saepe quidam instructior no usu.", + "__index": 2, + "dateCreated": "Thu, 05 Nov 2015 00:27:38 GMT" + } + ], + "archive": [ + { + "id": "-010-015", + "title": "'010-'015", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/2bafd7a2-fbbb-4904-8e64-ff394888fd24.png", + "label": "LIQUID REFLECTIVE", + "code": "5315 42944", + "caption": "Fabric that is highly reflective owing to its coating made up\r\nof thousands of glass microspheres. Each finished garment\r\nis hand sprayed individually and individually baked dry.\r\nThe varying intensity of the reflective element and varying\r\nintensity of colour, the dribbling and speckled effect, are\r\nowing to the high level of craftsmanship involved in the\r\nprocess, making each garment unique and unrepeatable.\r\nLining in quilted microfiber with polyester padding.\r\nStone Island badge with white embroidery, reserved for\r\ngarments that are made using advanced research into\r\nfabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/a0714935-2800-425f-9b34-63fdc4a7fc78.png", + "label": "30/30 Jacket", + "code": "5715 4TTY2", + "caption": "The 30/30 jacket is a cross section of the state of the art of Stone Island. A testament to three decades of exploration and development, it has been designed to embody the spirit of Stone Island’s endless creativity. Linked by the signature looped rigging system, both the jacket shell and jacket liner are reversible. These can be worn, either together or alone, in a total of 10 different ways. The transformative\r\nproperties of the fabrics mean that these 10 ways can each be worn in 3 different modes: Ice, Reflective,\r\nand Normal; resulting in a total of 30 different jacket states.\r\nThis piece features is our 30th anniversary special edition badge.\r\nJACKET /SHELL _ RASO GOMMATO PRISMATIC COVER.\r\nSatin weave cotton of military origin bonded on the inside to a a shiny transparent fine-grained polyurethane film reflecting the light, magnifying the colour effects and bestowing the surface with a three-dimensional and ‘liquid’ appearance.\r\nJACKET/ LINER_ THERMO REFLECTIVE / ENGINEERED WOOL\r\nThis material merges two of Stone Island’s most avant-garde research paths. It explores the interaction between light refraction and thermosensitivity technologies. The resins used to coat the nylon substrate host both the glass microspheres allowing fabric refraction and the micro-encapsulated pigments modifying the passage of light and thus enabling colour changes in relation to temperature. The final effect is an organic and dynamic interaction of light and colour. On the reverse side, an engineered wool face made with a double knit machine." + }, + { + "uri": "https://ltho.s3.amazonaws.com/d51dce63-d467-45ea-88a6-5b077ffe3c3c.png", + "label": "REFLECTIVE KNIT WITH WINDSTOPPER® 3L", + "code": "5715 587Y5", + "caption": "To celebrate the thirtieth anniversary of Stone Island, a yarn has been engineered that represents the\r\nheight of our tireless research. The President’S Knit 5715 has been created in Reflective yarn, made\r\nup of micro plates coated with glass microspheres trapped inside a polyester mesh. The structure of\r\nthe jumper has been made double, reflective on the outside and wool on the inside. The outer face\r\nhas then been printed in a darker shade using heat and pressure sublimation printing to amalgamate\r\nthe fibres, obtain an even surface and reduce the strong reflective appearance.\r\nThe detachable padded and quilted lining has been created in a polyester jersey laminated with a\r\nWindstopper® membrane, which provides an unbeatable balance between protection and comfort.\r\nThis piece features is our 30th anniversary special edition badge." + }, + { + "uri": "https://ltho.s3.amazonaws.com/5883b275-a2eb-4a34-890f-69b30250a62b.png", + "label": "RASO HAND PAINTED TORTOISE SHELL", + "code": "70565", + "caption": "Trench coat in a satin-weave cotton fabric of military origin. The garment has been dyed and then faded in selected areas with a corrosive paste. The bleached parts have then been hand-painted with a tortoiseshell-inspired motif also appearing on the Stone Island badge on the left sleeve. This extraordinary manual process makes each piece unique and unrepeatable. Detachable hood in garment-dyed padded iridescent nylon. Detachable lining in GARMENT-DYED DOWN_26 GR X SQM_N, an ultra-light nylon weighing only 26 grams per square metre, filled with the finest down specially treated to bear the stress of the garment dyeing procedure. Garment-dyed with special dye recipes. It is secured to the outer garment by the iconic Stone Island fastening system." + }, + { + "uri": "https://ltho.s3.amazonaws.com/a25cc013-5c2c-4221-974a-987b8fd00ab4.png", + "label": "HAND PAINTED SHEEPSKIN", + "code": "6115 00379", + "caption": "Sheepskin parka. The finished piece has been hand-sprayed on the outer face with a resin based product and then hand waxed to achieve a softer feel. Hood edged by fur trim. " + }, + { + "uri": "https://ltho.s3.amazonaws.com/fa5ed231-8b04-4ecc-b126-7a5543d5614a.png", + "label": "ICE JACKET THERMO-SENSITIVE FABRIC", + "code": "6115 43098", + "caption": "Hooded jacket in thermo sensitive fabric. A water- and wind-resistant polyurethane film is embedded with micro-encapsulated pigments. The molecules of these pigments modify the path of light and change colour according to the temperature. The garment is then padded with the finest down.\r\nTwo chest patch pockets, with snap-flap fastening and second pocket with vertical zip fastening. Adjustable elastic at cuffs. Cotton terry lined hood. Hidden zip and button fastening." + }, + { + "uri": "https://ltho.s3.amazonaws.com/bfd9defc-a1ef-4322-9e53-9505ec606ed9.png", + "label": "RASO GOMMATO REVERSE COLOUR PROCESS", + "code": "6215 42338", + "caption": "Jacket in Raso Gommato -rubberised satin- a mil. spec. cotton satin bonded with a polyurethane cover making the fabric wind and water resistant. In this version, the transparent cover is bonded to a previously piece dyed and printed the cotton satin. The finished garment undergoes an exclusive procedure named Reverse Colour Process, a fading technique followed by an overdyeing process on the finished garment, owing to the piece unparalleled shaded print effects, resist print areas and residual colour deposits, unique to each single item." + }, + { + "uri": "https://ltho.s3.amazonaws.com/390b68f3-7f9a-41af-a09c-bd15ac7008a3.png", + "label": "POLYPROPYLENE TELA", + "code": "40534", + "caption": "Down filled parka in polypropylene tela treated with an anti-drop agent. Polypropylene, a material with antibacterial properties, is the lightest man-made fibre. Even very bulky garments astonish for their specific lightness. The paste coloured yarn is texturized to obtain a cotton looking opaque aspect. " + }, + { + "uri": "https://ltho.s3.amazonaws.com/cc9f8c72-bbac-4d34-9762-4eae85374abf.png", + "label": "HIDDEN REFLECTIVE", + "code": "G0598", + "caption": "Vest in a reflective, water and wind resistant polyester fabric owing its features to a coating made of thousands of glass microspheres. An opaque black plating totally covers the refraction of the material which is unveiled when photographed in flash mode. The reflective features will be revealed through usage, with diverse effects and intensities from piece to piece, depending on its wearer usage. Stone Island logo on the back obtained through laser printing. Filled with the finest down. Sheepskin over collar. " + }, + { + "uri": "https://ltho.s3.amazonaws.com/512029b0-f4a3-469a-9d7d-1cd7fc15c1c8.png", + "label": "POLY COVER COMPOSITE + POLY FUR SILVER DETACHABLE LINING", + "code": "491Y1", + "caption": "Hooded jacket in Poly Cover Composite, a matte, colourless and opaque two-component water and wind resistant film. The garment dyeing technique colours the film without affecting its transparency. Completely heat sealed seams.\r\nDetachable hooded lining in Poly Fur, a synthetic fur with external silver coloured coating. Snap fastening on nylon tape." + } + ], + "__index": "4", + "dateCreated": "Thu, 05 Nov 2015 01:48:39 GMT" + }, + { + "id": "-000-009", + "title": "'000-'009", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/725e1b3f-58ee-49f6-8413-0a7e3dc9890f.png", + "label": "KEVLAR®", + "code": "3315 4031", + "caption": "Kevlar® felt. Five times more robust than steel given the same weight, Kevlar® is lightweight and\r\nhighly insulating. It is resistant to even extreme changes in temperature and to both fresh and salt\r\nwater. Owing to its qualities, it is used in the aerospace field, in competitive sailing and for Formula\r\n1 racing. With its soft yellow colour, dyeing this material is usually impossible, but with Stone Island\r\ngarment dyeing expertise, laminating the hydro-cohered Kevlar® fibres to an invisible nylon mesh and\r\na polyurethane coating on the outer side and a simple polyurethane coating on the inside this has been\r\nmade possible.\r\nDetachable lining in triple woven fabric, two nylon honeycomb patterns have been machine raised\r\nwith a further nylon yarn. The detachable lining is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world. Stone Island badge with white embroidery, reserved for\r\ngarments that are made using advanced research into fabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/c1c9db4f-5aa9-4698-9fe3-04a58a631653.png", + "label": "MONOFILAMENT-S", + "code": "3715 4316", + "caption": "Nylon twill monofilament mesh. On the inside, a cotton muslin\r\nlayer is laminated on the outer face with a black breathable\r\nand water resistant membrane, with the application of\r\nwhite polyester taped seams. The monofilament mesh has\r\na protecting function for the inner membrane. From the\r\naesthetical point of view, its transparency is designed to reveal\r\nthe internal construction of the garment. The piece is lined in\r\na brushed cotton fabric quilted with polyester padding. The\r\nfinished garment is over-dyed with a double cotton and nylon\r\nrecipe." + }, + { + "uri": "https://ltho.s3.amazonaws.com/4f1783c2-1ff7-4054-9d18-faebbd617305.png", + "label": "LIGHT", + "code": "3715 4Q30", + "caption": "Stone Island anticipated the use of light in clothing. Also for safety purposes in cases of\r\ndiminished visibility. The beginning of the Nineties, saw the introduction of the Reflective\r\nJacket - the first reflective garment ever - and in ‘002, to mark its twentieth anniversary,\r\nthe use of light went from being passive to active and self-generated with the use of optical\r\nfibres.\r\nThe fabric’s cotton warp is woven with polyester yarns as well as with optical fibre\r\nfilaments forming a band of light along the front fastening and around the edge of the hood.\r\nThe light is switched on using a small battery hidden inside the garment.\r\nHooded detachable lining in microfiber quilted to a polyester padding, attached to the\r\nouter garment using a system of ties, adapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/c62f3de3-a639-4818-988c-3aba9db057e5.png", + "label": "COMPACT", + "code": "3915 4N40", + "caption": "Compact treated linen felt. The Compact process is the transfer to finished garments of a textile process that is usually used to cleanse the natural fibres of their impurities. The garments are boiled at 130°C under pressure, with special additives. In the finished garments the material shrinks approximately 50%, the material becomes extraordinarily compact, the hand of the fabrics becomes dryer and naturally elastic. The fabrics take on an uneven, hand crafted appearance, as if they had been woven on antique looms. The fabric volume reduction involved with the Compact treatment creates very important pattern making complexities. The garment can be fitted to the body with a strings and loops system on the sides, front and hood. This system is inspired by anti-G suits of military aviators. Garment dyed; Compact pieces are very receptive to the garment dyeing recipes, the colours result far more intense than those of untreated garments.\r\nDetachable lining in peached microfiber, quilted with polyester padding. The detachable lining is attached to the outer garment using a system of ties, adapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/ba287902-7b92-4128-867f-69d6b1e40cc0.png", + "label": "OPAQUE NYLON TELA", + "code": "4315 4C24 30GR", + "caption": "Japanese featherweight nylon canvas, weighing just 30 grams per square\r\nmetre. The Stone Island badge is ultra light, in embroidered nylon mesh in\r\norder to avoid weighing down the sleeve. The garment is padded with the\r\nfinest down. The lightweight construction of the down bags and the direct\r\ninjection of feathers heightens the lightness of the garments.\r\n4315 G083 DIAGONAL COVER\r\nMulti-pocket vest in diagonal nylon backed by a PVC cover. The back side\r\nis in a technical polyester mesh with nylon twill tapings. Bib with zip fastening\r\ncompartments that contain pockets and the fold-away hood. Patch\r\nbellows pockets on the sides." + }, + { + "uri": "https://ltho.s3.amazonaws.com/320c3a59-c8ae-4dec-b863-15b15ccc368a.png", + "label": "4515 4H24", + "code": "OPAQUE NYLON CANVAS", + "caption": "Japanese featherweight nylon canvas, weighing just 37 grams\r\nper square metre. The Stone Island badge is ultra light, in\r\nembroidered nylon mesh in order to avoid weighing down the\r\nsleeve. The garment is padded with direct injection finest down.\r\nApart from highlighting the lightness of the fabric, the black\r\nedging under the fabric underscores the removal of the feather\r\nbags to increase the lightness of the garment. The yoke on the\r\nchest is disguised by the horizontal quilting motive. Inside the\r\nhood of the garment, an extra fabric hood with external coating\r\nand PVC print may be laced up by loops." + }, + { + "uri": "https://ltho.s3.amazonaws.com/35f9ec2a-fc52-42e5-b015-899e40ae9e89.png", + "label": "DAVID-TC SUBLIMATION PRINT", + "code": "4615 4C44", + "caption": "Reversible garment. Star-shaped cross-section polyester / polyamide\r\nJapanese microfiber. During garment dyeing under pressure at 130°C,\r\nthe heat transforms the structure and hand of the material radically.\r\nBeyond the depth of colour and despite maintaining an industrial\r\nappearance, the David-TC garments take on an appearance and\r\nhand that grant a unique tactile experience, similar to both chamois\r\nleather and non-woven coagulated fabric. One of the two faces has\r\nbeen over printed on the finished garment with a dark colour, using\r\na hot sublimation / pressure printing technique that reveals the\r\nconstruction details of both sides of the garment." + }, + { + "uri": "https://ltho.s3.amazonaws.com/03785345-d63c-4c18-addf-fb7461949cec.png", + "label": "ANTIQUED REFLECTIVE", + "code": "47157423", + "caption": "Cotton Batavia with a coating made up of thousands of glass microspheres. Antiqued Reflective fabric\r\nhas a strong capacity to reflect even the weakest light sources and is enhanced by a colour patina that is\r\nparticularly evident in the folds of the garment, granting to the piece a three-dimensional appearance.\r\nThe shape and details of the garment have been deliberately designed with a retro style in order to\r\ncreate a contrast with the modernity of the reflective face. The hood is lined in a khaki coloured wool\r\nwith parallel stripes, reminiscent of military blankets.\r\nDetachable lining in microfiber quilted to a thin polyester padding. The lining is attached to the outer\r\ngarment using a system of ties, adapted from those used in the sailing world.\r\nStone Island badge with white embroidery, reserved for garments that are made using advanced\r\nresearch into fabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/b7b6db65-3688-4472-839d-38852b074790.png", + "label": "RASO GOMMATO - HAND PAINTED CAMOUFLAGE", + "code": "4915", + "caption": "Drawing inspiration from the actions of soldiers during the First World War, who\r\nused earth from the trenches to make their uniforms dirty, thus inventing the\r\nconcept of camouflage, the fabric base in black satin weave cotton of military\r\norigin bonded to a black polyurethane cover on the inner face, has been faded\r\nwith a corrosive paste and then hand painted on the finished garment to create\r\na camouflage effect. By means of this manual process, each garment is rendered\r\nunique and unrepeatable.\r\nThe detachable quilted nylon lining with polyester padding, with front edging\r\nand collar in felted wool, is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/9a25ed8c-2293-4d6e-b63a-c17580113d63.png", + "label": "WAXED ICE - THERMO SENSITIVE FABRIC", + "code": "5115 7498", + "caption": "Cotton moleskin with a resin treatment containing themo sensitive\r\nquartz. The colour of the garment ranges from bright yellow at\r\nroom temperature to a deeper and deeper shade of olive green as\r\nthe temperature drops. The garment is washed and then waxed.\r\nThe detachable black woollen lining with Stone Island logo in the\r\ncentre is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world.\r\nStone Island badge with white embroidery, reserved for garments\r\nthat are made using advanced research into fabrics or processes." + } + ], + "__index": "3", + "dateCreated": "Thu, 05 Nov 2015 01:49:03 GMT" + }, + { + "id": "-990-999", + "title": "'990-'999", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/f58db57f-a469-4c7b-b248-6cab5a927c8a.png", + "label": "RASO GOMMATO COLOURED COVER", + "code": "05 4001", + "caption": "Satin weave cotton of military origin bonded to a\r\nmustard yellow polyurethane cover on the outside\r\nand white on the hood. The inner fabric face takes its\r\ncolouring from garment dyeing. Double parallel row\r\nof snap fasteners mounted on small rubber disks\r\nallow the garment to be tightened or loosened to fit." + }, + { + "uri": "https://ltho.s3.amazonaws.com/56189889-630b-4293-95e9-2c747d1209fe.png", + "label": "ICE JACKET CAMOUFLAGE THERMO-SENSITIVE FABRIC", + "code": "05 4N06", + "caption": "Cotton poplin with a camouflage print in a thermo-sensitive\r\ncoating with liquid crystals that change colour based on\r\nthe temperature. Over dyed on the finished garment. As the\r\ntemperature drops, the fabric print gradually disappears\r\nas it takes on the same shade as the solid colour of the\r\ngarment dye." + }, + { + "uri": "https://ltho.s3.amazonaws.com/d46fc981-d51c-4001-a72a-7d5bc3bedc15.png", + "label": "RUBBERISED SATIN SILVER COVER", + "code": "35 4405", + "caption": "Satin weave cotton of military origin bonded to a silver\r\npolyurethane cover on the outside. Padded with goose down.\r\nDouble parallel row of snap fasteners mounted on small rubber\r\ndisks allow the garment to be tightened or loosened to fit.\r\nLining in coloured peached polyester microfiber. Hood in the\r\nRaso Gommato Silver Cover garment dyed, with detachable wolf\r\nfur edging." + }, + { + "uri": "https://ltho.s3.amazonaws.com/65a6a008-a634-4155-8dba-0e2f22e1dc74.png", + "label": "REFLECTIVE JACKET", + "code": "1815 4N02", + "caption": "Owing to a coating made up of thousands of glass\r\nmicrospheres on a polyester base, the Reflective\r\nfabric has a strong capacity to reflect even the\r\nweakest light sources. It reflects and intensifies\r\nthe brightness of the colour of the fabric itself,\r\nparticularly if placed in the dark. If it is photographed\r\nusing a flash, it detracts light from the other\r\ncomponents in the shot, which show up as black.\r\nPocket linings in cotton mesh." + }, + { + "uri": "https://ltho.s3.amazonaws.com/7011fe4a-22de-4bf0-bd4d-4440c49d8409.png", + "label": "WQR WATER RESISTANT QUILTING", + "code": "2515 6L51", + "caption": "Nylon jersey quilted with polyester padding,\r\nwith a special external coating used to close\r\nall the needle holes produced in the quilting\r\nprocess, rendering the garment totally\r\nwaterproof. The garment takes its final\r\ncolouring from garment dyeing." + }, + { + "uri": "https://ltho.s3.amazonaws.com/ca0447d1-3bd3-4702-a7d5-f1da98764ffb.png", + "label": "LINO GOMMATO REVERSE COLOUR PROCESS", + "code": "28154P49", + "caption": "Black linen canvas bonded to a transparent polyurethane\r\ncover on the outside. By means of an exclusive process\r\ncarried out on the finished garment, the original colour of\r\nthe fabric is corroded, with the exclusion of the Stone Island\r\nlettering, of the two parallel stripes and of the name of the\r\nprocess on the left sleeve. The collar, placket, pocket flaps,\r\ncuffs and bottom hem are less faded owing to the double\r\nlayer of fabric and the seams. Light garment over dye." + }, + { + "uri": "https://ltho.s3.amazonaws.com/23b746d9-311b-4f9f-b356-d1f49046bda9.png", + "label": "THE PRESIDENT’S KNIT", + "code": "2915 5784", + "caption": "The President’s Knit is the name of a knitted garment introduced in the autumn winter ‘998-’999\r\nseason and then retaken with different processes in the years that followed. It is an innovative knitted\r\ngarment that takes on the functions of a jacket owing to its detachable lining.\r\nThe first of these garments was created in a double face knit, nylon chenille on the outside, cotton on\r\nthe inside. Three black nylon parallel stripes on the cuff. Ends of the sleeves and bottom hem as well\r\nin black nylon. The garment takes its final colouring from garment dyeing.\r\nDetachable lightweight nylon fabric lining with water resistant polyurethane resin finish, quilted\r\nwith polyester padding. The detachable lining is attached to the outer garment using a system of ties,\r\nadapted from those used in the sailing world." + }, + { + "uri": "https://ltho.s3.amazonaws.com/ebaf6ae8-f465-4a8d-b6d0-ff45a93f0350.png", + "label": "LAMINATE - NOC 1", + "code": "3015 4C41", + "caption": "Two ultra light cotton gauzes laminated by means of a\r\nmatte coloured resin. This slightly stretch fabric provides\r\ntechnical features owing to its light lamination. This fabric\r\nhas a natural appearance but high-tech performance and\r\nis waterproof, windproof and breathable. Fully thermotaped\r\nseams on the inside.\r\nInjection moulded PVC NOC 1 hood. The shape of the\r\nhood is taken by the shape of gas masks. A research by\r\nStone Island into the making of non-fabric components." + }, + { + "uri": "https://ltho.s3.amazonaws.com/a39caa9e-4dbe-4c31-8bda-41ebc2a508b4.png", + "label": "PURE METAL SHELL – BRONZE", + "code": "3115 4T43", + "caption": "100% bronze mesh applied to a black nylon jersey base. The polyurethane adhesive\r\nprovides a light protection for the mesh. A Teflon® treatment makes the garment water\r\nresistant. The metal mesh is a living material with the features of metallic materials when\r\nused untreated, and therefore they are subject to oxidation over time, losing its shine.\r\nThe worn look, creases and breaks that form on the surface are features that make each\r\ngarment different from the next.\r\nDetachable woollen lining with raw cut edging, attached to the outer garment using a\r\nsystem of ties adapted from those used in the sailing world.\r\nThe Autumn Winter ´999-´000 collection saw the introduction of the Stone Island badge\r\nwith white embroidery, dedicated to garments created using advanced research into\r\nfabrics or processes." + }, + { + "uri": "https://ltho.s3.amazonaws.com/f221b596-7cc0-493c-9cea-6755f64d1641.png", + "label": "PURE METAL SHELL - SILVER SPRAY", + "code": "3115 4U39", + "caption": "Ultra light polyester fabric with the application, through\r\na patented procedure, of a micro stainless steel film in a\r\nvacuum and sterile environment. This Japanese fabric,\r\nused in aeroplanes to shield the on-board computers from\r\nelectromagnetic radiation. Cotton canvas lining. The garment is\r\npadded with goose down.\r\nThe Autumn Winter ´999-´000 collection saw the introduction\r\nof the Stone Island badge with white embroidery for pieces\r\ninvolving advanced research." + } + ], + "__index": "2", + "dateCreated": "Thu, 05 Nov 2015 01:49:20 GMT" + }, + { + "id": "-982-989", + "title": "'982-'989", + "__index": "1", + "dateCreated": "Wed, 02 Dec 2015 05:15:20 GMT", + "images": [ + { + "uri": "https://ltho.s3.amazonaws.com/e486c7c7-798e-4bf7-9e67-973f2cb02368.png", + "label": "TELA STELLA", + "code": "45 4NN", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/757164f9-0699-482a-9187-e7d097f84319.png", + "label": "TELA STELA DUAL COATED", + "code": "65 404", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/eb9cadb6-9712-41cf-9984-086518c7c391.png", + "label": "TELA STELLA DUAL COATED", + "code": "65 410", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/8237f317-5272-4760-a6ab-b56c475b50d3.png", + "label": "JOCK-23", + "code": "75 436", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/c790cbf7-0a92-449e-8557-f6174946ab68.png", + "label": "JOCK-23", + "code": "75 460", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/1062f397-c1d7-4012-ae8d-9ddf13363743.png", + "label": "JOCK-23", + "code": "75 409", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/5f315b73-1572-460c-abfe-cda498886abe.png", + "label": "RASO GOMMATO BLACK COVER", + "code": "35 4NN", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/cd370f63-4fab-41e1-bbb6-d9e4955d068e.png", + "label": "GLAZED SILK LIGHT", + "code": "55 4910", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/417e64df-f318-4500-977b-2eaed1668bc4.png", + "label": "RASO GOMMATO BLACK COVER", + "code": "65 4A10", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/93d8d8fa-ad6e-4fe5-9182-c9e45c7e4ff5.png", + "label": "NYLON RIP-STOP COVER", + "code": "75 4503", + "caption": "" + } + ] + } + ], + "hub": [ + { + "id": "stone-island-x-nike-co-lab", + "date": "Wed, 09 Dec 2015 12:00:00 GMT", + "title": "Stone Island x Nike Co-Lab", + "subtitle": "Subtitle", + "body": "Lorem ipsum dolor sit amet, eu has alterum adipisci, vero eloquentiam ei pro, ex appetere repudiare usu. Commune postulant eum ei, verear instructior mediocritatem mea ei. Tota postea fabellas his et, pro scaevola expetenda cotidieque an. Ex nam utamur sanctus. Ne regione nostrum vix, dicunt recusabo ex sea. Dicit persius posidonium vis no.\r\n\r\nPosse ocurreret mel an. In est alii esse nihil. Nam quod minim eu, pro et harum accumsan philosophia. Legendos pericula et sit. Vix in eruditi fastidii. Sale omittam te mea.\r\n\r\nUt pro possit tamquam consequat, no dico omnis dissentias sit, habemus eleifend liberavisse per te. An ancillae mediocritatem usu. Te eam nostro integre. Sea eu fierent iracundia argumentum. Augue adolescens dissentiunt eu nec. Eu nec legere facilisi, sed consetetur consectetuer ne.\r\n\r\nPostea indoctum at qui, vel ne debet simul tractatos. Ut est suavitate theophrastus, viris viderer mea an. Nec id delicata vituperatoribus, putent adipisci sed id. Nostro labitur ne eum, sea atqui aliquam id. Te aeterno democritum has, vix choro nostrud eligendi id, et illum argumentum est.\r\n", + "link": "http://stoneisland.com/", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/9369ec1a-9375-4b96-b3c8-550d1882f670.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/2910c67b-2c6a-4db1-84f9-862cc8b8663a.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/2db3dbf8-19df-4e5e-b912-4a413a478d8e.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/d28ca1f8-82be-4826-8192-2817ba50a28f.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/6a734bdc-8327-4e5d-bc41-020766cc01c1.png", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/1702488f-7aa6-40e8-92cd-dcc67050f919.png", + "caption": "" + } + ], + "__index": "0", + "dateCreated": "Thu, 05 Nov 2015 04:46:29 GMT", + "store": "true" + }, + { + "id": "multiple-images", + "date": "Mon, 09 Nov 2015 12:00:00 GMT", + "title": "Multiple Images", + "subtitle": "Lookin' good", + "body": "Lorem ipsum dolor sit amet, quis interpretaris pri at, eos fuisset invidunt euripidis no. Movet appetere vivendum id sit, eros ipsum in vim, qui ei vidit doming vituperatoribus. Harum voluptua dissentiunt mel ut, mel no duis inermis, cu eros solum mel. Vidit consulatu eloquentiam vix ei, mei ea nullam patrioque contentiones. Est ei nobis laudem, alii definitionem ea vis.\r\n\r\nPropriae deseruisse reprimique at mei, no unum epicuri postulant pri, error consul reprehendunt cum te. Dicit liberavisse pro te, mel debet adipisci eu, sint vidit aliquid no ius. Sanctus deterruisset mei no, enim homero eleifend mel ad. Odio elit et pri, eu consul dicunt equidem sed, vis ex nulla sonet dicant.\r\n\r\nVis sonet ignota neglegentur et, utinam iuvaret per et. Ea tincidunt temporibus usu. Et oportere iracundia pro, ad ocurreret comprehensam eam. Quo ad velit putant, choro aperiam insolens cu pri. Ex movet aliquid inermis pro.", + "link": "http://okfoc.us/", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/c16bd113-343f-4b99-b70d-b7a750236b57.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/f15c3393-ed7e-4e8e-88ef-30037b2af4c4.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/6ba29fc8-80fa-4c35-84f6-155cf2f409f7.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/15aab5f6-737d-4577-82a0-b2879687d269.jpg", + "caption": "" + } + ], + "__index": "1", + "dateCreated": "Fri, 06 Nov 2015 00:46:56 GMT", + "store": "false" + }, + { + "id": "video-post", + "date": "Wed, 18 Nov 2015 12:00:00 GMT", + "title": "Video Post", + "subtitle": "Test", + "body": "Lorem ipsum dolor sit amet, id tacimates scribentur quo, pro at autem incorrupte quaerendum. Vim homero scaevola in, eos ad nibh bonorum, ex vero deserunt has. Accusam dignissim instructior at cum, postea mediocritatem no vis. Diam veniam vivendum ut nec, nec putant insolens ex.\r\n\r\nMel te nostrum deterruisset. Dicat eripuit ut nam, at adolescens concludaturque sit. Error legendos ex pro. Est doming democritum at, dicat euripidis ne pri, liber quaerendum ut mea. Eirmod meliore habemus ius eu, modus nostro efficiantur vim in. At mea bonorum deseruisse, stet recteque mea ad.\r\n\r\nHas ne dicta vocent pertinax. Ut regione accommodare vim, an sit iudico appareat facilisis. Te quem vitae has, petentium maluisset vim ut. Te nostrud fuisset nec, in mea esse nostrum. Eu ius ullum paulo debitis.\r\n", + "link": "https://www.youtube.com/watch?v=NBd_4JErW3k", + "image": [ + { + "uri": "https://ltho.s3.amazonaws.com/460ad69c-0ca2-4caf-92e0-aeb2710d75e2.jpg", + "caption": "" + } + ], + "__index": "2", + "dateCreated": "Fri, 06 Nov 2015 00:53:21 GMT", + "store": "false" + } + ], + "page": [ + { + "id": "terms-and-conditions", + "title": "Terms and Conditions", + "image": { + "uri": "", + "caption": "" + }, + "body": "Welcome to www.stoneisland.com. These terms and conditions (the “General Terms and Conditions of Use”) govern your use of, access to, and purchase of products from the United States section of www.stoneisland.com (the \"US Site\"). By using the US Site, you agree to comply with and be bound by these General Terms and Conditions of Use. If you do not agree to these General Terms and Conditions of Use, please do not use the US Site.\r\n\r\n1. GENERAL\r\nwww.stoneisland.com is the property of SPORTSWEAR COMPANY, a company having an address at Galleria Cavour 4, 40124 Bologna, Italy (\"STONE ISLAND and STONE ISLAND DENIMS\") and is operated under license by YOOX Corporation, a Delaware corporation having an address at 148 Lafayette Street, 10th Floor, New York, NY, 10013, United States of America (the \"Provider\"). \r\n\r\n2. OTHER SITE POLICIES\r\nPlease review our General Terms and Conditions of Sale, Return Policy and Privacy Policy (collectively, the “Site Policies\"). All Site Policies are incorporated in these General Terms and Conditions of Use by this reference and, therefore, apply to your access to, use of and purchase of products from the US Site. If you do not agree to our Site Policies, please do not use the US Site. We reserve the right to make changes to the US Site, the Site Policies, and these General Terms and Conditions of Use at any time. If any of these conditions shall be deemed invalid, void, or for any reason unenforceable, that condition shall be deemed severable and shall not affect the validity and enforceability of any remaining condition. \r\n\r\n3. PURCHASE FOR PERSONAL USE ONLY\r\nYou may purchase products on the US Site only for personal use and not for resale. By placing your order, you certify that you are purchasing products for personal use only and not for resale and you accept our General Terms and Conditions of Sale. WE RESERVE THE RIGHT TO REFUSE ORDERS FOR ANY REASON WITHOUT EXPLANATION. \r\n\r\n4. USER'S SUBMISSIONS\r\nWe welcome your comments and feedback regarding the US Site, our products and our services. We do not, however, accept confidential or proprietary information. Accordingly, all comments, feedback, reviews, ideas, suggestions, materials, images, information and other submissions (collectively, the “Submissions”) disclosed, submitted or offered to the Provider via the US Site, or otherwise, are not confidential. You represent and warrant that any Submissions that you submit to the Provider are made in compliance with applicable laws, do not violate any right of any third party, including privacy and intellectual property rights. By disclosing, submitting or offering any Submissions to the Provider, you grant the Provider and STONE ISLAND and STONE ISLAND DENIMS a nonexclusive, royalty-free, perpetual, irrevocable, and fully sublicensable right to use, reproduce, modify, adapt, publish, translate, create derivative work from, distribute, display such Material throughout the world in any media. You are and shall remain solely responsible for any Submissions you disclose, submit or offer to the Provider or STONE ISLAND and STONE ISLAND DENIMS. \r\n\r\n5. PRIVACY\r\nWe recommend that you read our Privacy Policy, which explains our online privacy practices. \r\n\r\n6. COPYRIGHT\r\nAll content included on www.stoneisland.com US Site, such as works, images, pictures, dialogues, music, sounds, videos, documents, drawings, figures, logos, menus, web pages, graphics, colors, schemes, tools, fonts, designs, diagrams, layouts, methods, processes, functions and software (collectively, the \"Content\"), is the property of STONE ISLAND and STONE ISLAND DENIMS or its content suppliers and is protected by national and international copyright and other intellectual property laws. You may not reproduce, publish, distribute, display, modify, create derivative work from, or exploit in any way, in whole or in part, the Content without the prior express written consent of STONE ISLAND and STONE ISLAND DENIMS, or its content suppliers, as the case may be. STONE ISLAND and STONE ISLAND DENIMS and its content suppliers shall have the exclusive right to authorize or prohibit in their sole discretion any reproduction, publication, distribution, display, modification, creation of derivative work from, or exploitation in any way of, in whole or in part, the Content. STONE ISLAND and STONE ISLAND DENIMS and its content suppliers shall have the right, at any time, to claim the authorship of any Content posted on the US Site and to object to any use, distortion or other modification of such Content. Any reproduction, publication, distribution, display, modification, creation of derivative work from, or exploitation in any way of, the Content expressly authorized in writing by STONE ISLAND and STONE ISLAND DENIMS or its content suppliers shall be carried out by you for lawful purposes only and in compliance with all applicable laws. \r\n\r\n7. LICENSE AND SITE ACCESS\r\nThe viewing, printing or downloading of any Content from the US Site grants you only a limited, nonexclusive and nontransferable license for use solely by you for your own personal use and not for republication, distribution, assignment, sublicense, sale, preparation of derivative works or other use. No part of any Content may be reproduced in any form or incorporated into any information system, electronic or mechanical, other than for your personal use (but not for resale or redistribution). Any unauthorized use of the US Site and the Content immediately terminates the license granted by the Provider. \r\nYou will be solely responsible for all damages and other harm resulting from your use of the US Site and the Content. STONE ISLAND and STONE ISLAND DENIMS and the Provider shall not be deemed liable for any use of the US Site and the Content made by you in violation of any applicable laws and regulations and these General Terms and Conditions of Use. \r\n\r\n8. COPYRIGHT COMPLAINTS\r\nWe respect the intellectual property of others. If you believe that your work has been copied in a way that constitutes copyright infringement, please contact a STONE ISLAND and STONE ISLAND DENIMS copyright representative for further information at privacy@mail.stoneisland.com. \r\n\r\n9. LINKS TO OTHER WEB SITES\r\nThe US Site may provide hyperlinks to third party websites (“Third Party Websites\"). The Provider and STONE ISLAND and STONE ISLAND DENIMS do not operate, control, endorse or guarantee any Third Party Websites. You agree that the Provider and STONE ISLAND and STONE ISLAND DENIMS are not responsible for any content, services and/or products provided by any Third Party Website, nor are the Provider and STONE ISLAND and STONE ISLAND DENIMS responsible for any practice followed by such Third Party Website with respect to the collection and processing of personal data of their users. When you access any Third Party Website through a hyperlink posted on the US Site, please carefully read the terms and conditions of use, privacy policy and other policies of such Third Party Website. Our policies do not apply to any Third Party Website. \r\nYou The Provider provides hyperlinks to Third Party Websites only for the convenience of its users. By providing hyperlinks to Third Party Websites, the Provider does not recommend that its users access such Third Party Websites. \r\n\r\nYOU AGREE THAT YOUR USE OF ANY THIRD PARTY WEBSITE IS AT YOUR SOLE RISK AND WITHOUT WARRANTIES OF ANY KIND BY THE PROVIDER, EXPRESSED, IMPLIED OR OTHERWISE, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NONINFRINGEMENT. UNDER NO CIRCUMSTANCES ARE THE PROVIDER AND/OR STONE ISLAND and STONE ISLAND DENIMS LIABLE FOR DAMAGES ARISING FROM ANY TRANSACTION BETWEEN YOU AND ANY THIRD PARTY WEBSITE OR FOR ANY INFORMATION APPEARING ON THIRD PARTY WEBSITES. \r\n\r\n10. GOVERNING LAW AND CHOICE OF FORUM\r\nThe laws of the State of New York (without giving effect to its conflicts of law principles) govern all matters arising out of or relating to these General Terms and Conditions of Sale, including, without limitation, their validity, interpretation, construction, performance, and enforcement. All legal proceedings arising out of or in connection with these General Terms and Conditions of Sale shall be brought solely in the City of New York, State of New York. \r\n\r\n11. DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY\r\nTHE US SITE AND ALL INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) AND SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE ARE PROVIDED BY THE PROVIDER ON AN \"AS IS\" AND \"AS AVAILABLE\" BASIS, UNLESS OTHERWISE SPECIFIED IN WRITING. THE PROVIDER MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE OPERATION OF THIS SITE OR THE INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) OR SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE, UNLESS OTHERWISE SPECIFIED IN WRITING. YOU EXPRESSLY AGREE THAT YOUR USE OF THIS SITE IS AT YOUR SOLE RISK. \r\n\r\nTO THE FULL EXTENT PERMISSIBLE BY APPLICABLE LAW, THE PROVIDER DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE PROVIDER DOES NOT WARRANT THAT THIS SITE; INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) OR SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE; THEIR SERVERS; OR E-MAIL SENT FROM THE PROVIDER ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. THE PROVIDER WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF THIS SITE OR FROM ANY INFORMATION, CONTENT, MATERIALS, PRODUCTS (INCLUDING SOFTWARE) OR SERVICES INCLUDED ON OR OTHERWISE MADE AVAILABLE TO YOU THROUGH THIS SITE, INCLUDING, BUT NOT LIMITED TO DIRECT, INDIRECT, INCIDENTAL, PUNITIVE, AND CONSEQUENTIAL DAMAGES, UNLESS OTHERWISE SPECIFIED IN WRITING. \r\n\r\nCERTAIN STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MIGHT HAVE ADDITIONAL RIGHTS.\r\n\r\nThe following General Terms and Conditions of Sale govern the sale of merchandise by YOOX Corporation, an affiliate of YOOX NET-A-PORTER GROUP S.p.A. (the \"Provider\" or \"we\") to you through the US section of www.stoneisland.com (\"US Site\"). The US Site is available only for purchases made and delivered within the United States. Your use of the US Site to purchase merchandise indicates your agreement to follow and to be bound by these General Terms and Conditions of Sale.\r\n\r\n1. ORDERS & PRODUCTS\r\nAll orders are subject to e-mail confirmation by us. Please note that the products displayed on the US Site may be out-of-stock or discontinued, and availability is not guaranteed. Please note that while we have tried to accurately display the colors of products, the actual colors you see will depend on your monitor and may not be accurate. \r\n\r\n2. PRICES\r\nAll prices are in US Dollars. Prices may change without notice from time to time. The total amount due is inclusive of sales tax applied in accordance with applicable state and local regulations based on your shipping address. The applicable sales tax amount is indicated on the payment page of the cart.\r\n\r\nThe amount of sales tax charged on your order will depend upon various factors, including type of item purchased, sales price and destination of the shipment. Sales tax regulations may change between the time you place an order and the time of credit card charge authorization and this may affect the calculation of sales taxes. The amount appearing on your payment page of the cart may differ from the sales taxes ultimately charged as indicated in the invoice you will receive with the shipping confirmation e-mail.\r\n\r\nAll prices are inclusive of customs and import duties.\r\n\r\n3. SHIPPING COSTS\r\nYou are responsible for the shipping costs associated with the delivery of the products you purchase on the US Site as specified on your order confirmation. \r\n\r\n4. SHIPMENTS AND DELIVERY\r\nYou bear all risks of loss and damage to the products from the time the same have cleared our fulfillment house. Delivery is deemed complete and title to the products passes to you upon acceptance of shipment by a common carrier.\r\n\r\n5. RETURNS AND REFUNDS\r\nPlease refer to our Return and Refund Policy, which forms an integral part of these General Terms and Conditions of Sale. \r\n\r\n6. BINDING AGREEMENT\r\nOur order confirmation, these General Terms and Conditions of Sale and our other Site Policies shall be deemed the final and integrated agreement between you and us on the matters contained in these General Terms and Conditions of Sale. \r\n\r\n7. GOVERNING LAW AND CHOICE OF FORUM\r\nThe laws of the State of New York (without giving effect to its conflicts of law principles) govern all matters arising out of or relating to these General Terms and Conditions of Sale, including, without limitation, their validity, interpretation, construction, performance, and enforcement. All legal proceedings arising out of or in connection with these General Terms and Conditions of Sale shall be brought solely in the City of New York, State of New York. \r\n\r\n8. DISCLAIMERS AND LIMITATIONS OF LIABILITY\r\nTHE PROVIDER MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE PRODUCTS INCLUDED IN THE www.stoneisland.com US SITE NOR AS TO THE MERCHANDISE BEING SOLD TO YOU. TO THE FULLEST EXTENT PERMISSIBLE BY APPLICABLE LAW, THE PROVIDER DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, AND THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, WHICH EXTEND BEYOND THE DESCRIPTION OF THE MERCHANDISE CONTAINED ON OUR ORDER CONFIRMATION. THE PROVIDER WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF THE US SITE, INCLUDING BUT NOT LIMITED TO DIRECT, INDIRECT, INCIDENTAL, PUNITIVE AND CONSEQUENTIAL DAMAGES \r\nCERTAIN STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MIGHT HAVE ADDITIONAL RIGHTS.\r\n\r\n9. SEVERABILITY\r\nIf any provision of these General Terms and Conditions of Sale is determined to be invalid, illegal or unenforceable, the remaining provisions of these General Terms and Conditions of Sale remain in full force to the extent permitted by law.\r\n\r\n10. PRIVACY\r\nThe terms and conditions of the our Privacy Policy govern the processing of all personal data collected from you in connection with your purchase of products through the US Site.\r\n\r\n11. FORCE MAJEURE\r\nProvider shall not be liable for any delay or failure in performance caused by circumstances beyond its reasonable control.\r\n\r\n12. ERRORS AND INACCURACIES\r\nOur goal is to provide complete, accurate, and up-to-date information on our website. Unfortunately, it is not possible to ensure that any website is completely free of human or technological errors. This website may contain typographical mistakes, inaccuracies, or omissions, some of which may relate to pricing and availability, and product information. We reserve the right to correct any errors, inaccuracies or omissions, including after an order has been submitted, and to change or update information at any time without prior notice.\r\n", + "__index": "1", + "dateCreated": "Tue, 17 Nov 2015 20:31:52 GMT", + "tag": "terms" + }, + { + "id": "privacy-policy", + "title": "Privacy Policy", + "image": { + "uri": "", + "caption": "" + }, + "body": "Welcome to www.stoneisland.com. Please read our Privacy Policy carefully. This Privacy Policy applies when you visit and surf the United States section of www.stoneisland.com (the \"www.stoneisland.com US Site\") regardless of whether you purchase products or not, when you register with the www.stoneisland.com US Site, and when you use our services. By using the www.stoneisland.com US Site, you accept the practices described in this Privacy Policy. If you do not want to accept the practices described in this Privacy Policy, please do not use the www.stoneisland.com US Site. \r\nThe www.stoneisland.com US Site is operated under license by , a Delaware corporation having an address at 148 Lafayette Street, 10th Floor, New York, NY, 10013, United States of America (\"YOOX USA\"). YOOX USA is a subsidiary of YOOX NET-A-PORTER GROUP S.p.A., an Italian company having its registered address at via Morimondo, 17 – Milano 20143 (\"YOOX\") and controls the personal data of users and customers of the www.stoneisland.com US Site together with SPORTSWEAR COMPANY, having address at Galleria Cavour 4, 40124 Bologna, Italy, Italy, VAT, 01046470371 (jointly referred to as \"YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY\"). \r\nSince personal data of users and customers of the www.stoneisland.com US Site may be processed in Italy, any such processing of personal data will be conducted in compliance with applicable US law as well as the Italian Data Protection Code (Legislative Decree no. 196 dated June 30, 2003). Pursuant to the Italian Data Protection Code, YOOX USA is the controller of personal data of users and customers of the www.stoneisland.com US Site. As controller of personal data, YOOX USA independently determines the purposes and means by which your personal data are processed, including all security measures. As required by the Italian Data Protection Code, YOOX USA has appointed YOOX NET-A-PORTER GROUP as its data protection representative in Italy. As our data protection representative in Italy, YOOX, together with SPORTSWEAR COMPANY, independently ensures that personal data are processed in Italy in a correct and lawful manner and in accordance with good practice.\r\n\r\n1. OUR POLICY\r\nEveryone has the right to the protection of his/her personal data. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY respect our users' right to be informed about the collection and processing of their personal data. The www.stoneisland.com US Site has been designed in such a way that the use of your personal data will be minimal and will not exceed the original purpose for which your personal data are collected and/or processed. In particular, we do not disclose your identity when the purpose for which your personal data are being processed can be achieved by using anonymous aggregate information. This Privacy Policy is intended to provide you with all the information you need in order to understand our privacy practices.\r\nHowever, if you have any questions regarding our privacy practices and this Privacy Policy, please contact us at the following e-mail address:privacy@mail.stoneisland.com.\r\nThe www.stoneisland.com US Site is not directed at, nor do we knowingly collect personally identifiable information from children under the age of 13, although we may sell children's products or services for purchase by adults. If you are under 18, you may use the www.stoneisland.com US Site only with the involvement of a parent or guardian. \r\n\r\n2. WHO PROCESSES YOUR PERSONAL DATA\r\nFor organizational and operational purposes only, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY have appointed certain entities that will also process personal data of users and customers of the www.stoneisland.com US Site. Such purposes are strictly connected to the performance of services provided on the www.stoneisland.com US Site by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY, including the sale of products.\r\nThe above-mentioned data processors have been chosen by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY because of their experience in processing personal data, their sufficient guarantees with respect to compliance with applicable laws and regulations, including the Italian Data Protection Code (Legislative Decree no. 196 of 30 June 2003) as well as the technical security measures adopted by them in connection with the processing of personal data. In processing personal data of the users of the www.stoneisland.com US Site, our processors will act only in accordance with instructions provided by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY. We regularly verify that our processors comply with our instructions and that they provide sufficient guarantees with respect to their compliance with applicable laws and regulations. The following is a list of the companies primarily involved in the processing of personal data of users and customers of the www.stoneisland.com US Site:\r\n\t•\tUnited Parcel Service S.p.A.(“UPS\"). We provide UPS, by electronic means, with customers' addresses and other personal data for the purpose of shipping, delivering and returning products purchased on the www.stoneisland.com US Site;\r\n\t•\tBT Italia S.p.A., for purposes related to the maintenance of YOOX NET-A-PORTER GROUP servers;\r\n\t•\tYOOX NET-A-PORTER GROUP Italy. We provide YOOX NET-A-PORTER GROUP Italy with personal data of users and customers for purposes related to direct marketing services of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY and in connection with other services provided by YOOX NET-A-PORTER GROUP Italy to YOOX USA, such as call center and help desk services.\r\nPlease contact our Customer Care or send us an e-mail at privacy@mail.stoneisland.com if you would like to receive a full list of our data processors.\r\n\r\n3. HOW DO WE USE PERSONAL DATA AND FOR WHAT PURPOSES\r\nYour personal data are collected and processed by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY for purposes which are strictly connected to the use of the www.stoneisland.com US Site, its services and the purchase of products on the www.stoneisland.com US Site. However, your personal data may also be used for other processing operations within the limits of such purposes. In particular, your personal data may be processed for the following purposes:\r\n\t•\twhen you register with the www.stoneisland.com US Site we collect your personal data (for example, your personal information, e-mail address, gender) through the relevant registration form (My Account) in order to provide you with services in reserved access areas of the www.stoneisland.com US Site and in order to send you our Newsletter, when specifically requested;\r\n\t•\twhen you request Customer Care services, we collect your personal data (for example, your password) for purposes strictly necessary to provide you with customer care services relevant to the US Site and to the purchase of products on the US Site;\r\n\t•\twhen you request Customer Service assistance, we collect your personal data (for example, your first and last names, e-mail address and password) for purposes strictly necessary to provide you with Customer Service relevant to the www.stoneisland.com US Site and to the purchase of products on the www.stoneisland.com US Site;\r\n\t•\twhen you are executing purchasing procedures for products sold on the www.stoneisland.com US Site, including conclusion of an agreement for the purchase of products, we collect your personal data (for example, personal information, e-mail address, address, Credit Card numbers, bank account number and telephone number) on your order form only for the purpose of selling the products ordered by you;\r\n\t•\twhen you request technical assistance, we collect your personal data in order to provide you with information on net-surfing, Internet browsing or viewing and downloading web pages;\r\n\t•\twhen creating your Wish List, we process your personal data in order to customize our services for the purchase of products on the www.stoneisland.com US Site.\r\nYour personal data are generally processed by electronic means; however, in certain circumstances, paper-based means may be used (for example, when the processing of your personal data is required for the prevention of fraud against us). Your personal data are stored in a way which allows YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY to identify you for the period that is strictly necessary for the original purposes for which such personal data are collected and subsequently processed, all in accordance with applicable laws.\r\nPlease report any changes to your personal data to the e-mail address privacy@mail.stoneisland.com in order to ensure that your personal data are always accurate and kept up-to-date.\r\nYour personal data will not be disclosed to third parties for purposes not permitted by law or without your explicit consent. Your personal data may only be disclosed to third parties when it is necessary to process an order placed by you. For example, your personal data are disclosed to Banca Sella S.p.A. for the performance electronic payment services, through Credit/Debit Cards. Moreover, your personal data may be disclosed to the police or to judicial authorities, in compliance with applicable laws and regulations and upon a formal request by such authorities for the purposes of preventing a fraud against us (anti-fraud services). Data processors will also have access to your personal data, as stated in Section 2 of this Privacy Policy, for the specific purposes stated in that Section. In all the above circumstances, your consent for data processing will not be specifically requested.\r\nYour personal data will not be transferred to any countries outside the United States and Italy if such countries do not provide for an adequate level of protection of the privacy of individuals. Should the above be necessary in order to supply services to you or to execute contracts for the purchase of products, the transfer of your personal data to any such countries will be carried out only after the execution of specific contracts between YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY and all parties involved, in accordance with applicable laws and regulations.\r\nWe wish to inform you that YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY process users' personal data for purposes that are strictly connected to the supply of services through the www.stoneisland.com US Site, the execution of contracts related to the sale and purchase of products on the www.stoneisland.com US Site and, after receiving your consent, in order to send you information on new commercial initiatives which are strictly related to the www.stoneisland.com US Site's activities and services. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY process your personal data for direct marketing purposes, including by e-mail, only after receiving your consent.\r\nYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may have access to third parties' personal data which is directly disclosed by their users to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY, for instance when the user buys a product to be sent to a friend, when the user who pays the purchase price for a product is different from the recipient of such product, or when a user wishes to recommend to a friend a service provided through the www.stoneisland.com US Site or the sale of a particular product posted on the www.stoneisland.com US Site.\r\nIn all cases involving the disclosure of information of a third party, you must obtain the consent of such individuals before disclosing their personal data to YOOX USA, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY and have informed said individuals about this Privacy Policy. You will be the only person liable in connection with the disclosure of information and data relevant to such third parties and with any other incompatible and unlawful use of such data if they have not provided you with their consent. You agree to indemnify, defend and hold each of YOOX USA, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY harmless from any liability, claims and expenses, including reasonable attorneys' fees, arising from or related to any unauthorized disclosure of personally identifiable information of third parties.\r\n\r\n4. WHAT HAPPENS IF YOU DO NOT DISCLOSE YOUR PERSONAL DATA\r\nThe personal data we request you to provide to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY, including your e-mail address, your address, your Credit/Debit Card numbers, bank account number and your telephone number, is necessary for the processing of your order for the purchase of products on the www.stoneisland.com US Site, to supply other services provided on the www.stoneisland.com US Site upon your request, or to carry out obligations arising out of applicable laws and regulations.\r\nYour refusal to provide certain personal data to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may prevent YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY from processing your order for the purchase of products sold on the www.stoneisland.com US Site or from providing other services through the www.stoneisland.com US Site, such as Customer Services, sending the Newsletter, use of the Wish List, recommending a product to a friend.\r\nYour failure to provide personal data to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may prevent the processing of your order for the purchase of products sold or to provide services through the www.stoneisland.com US Site. \r\nThe disclosure of personal data to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY other than that required in order to fulfill legal or contractual obligations or to provide the services requested by you is optional and does not have any effect on the use of the www.stoneisland.com US Site and its services or on the purchase of products on the www.stoneisland.com US Site. We will inform you if the personal data we ask you to provide is necessary or optional by marking with an asterisk (*) the information that is necessary. Your failure to disclose optional personal data will not pose any obligation or disadvantage to you, except to the extent that we may no be able to offer you some of our optional, personalized features of the www.stoneisland.com US Site. \r\n\r\n5. TO WHOM YOUR PERSONAL DATA WILL BE DISCLOSED \r\nYour personal data may be disclosed to third parties who provide specific services as Data Processors on behalf of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY or who autonomously process personal data collected by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY in connection with the performance of a contract for the purchase of products on the www.stoneisland.com US Site (for example, Banca Sella, S.p.A.). \r\nAny such disclosure will be conducted, in each instance, without exceeding the original purposes for which your personal data were collected and subsequently processed. In addition, your personal data may be disclosed to third parties in order to (1) comply with applicable laws, (2) respond to governmental and judiciary inquiries, (3) comply with valid legal process, and (4) protect the rights or property of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY. \r\nAny third party information disclosed to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY in accordance with this Privacy Policy will not be used for any purpose other than as required to technically operate the service, to complete a transaction, or as otherwise required by law. \r\nIn the event there is a change in the corporate structure of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY including, without limitation, by merger, consolidation, sale, liquidation, or transfer of substantial assets, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may, in their sole discretion, transfer, sell or assign personal data collected on and through the www.stoneisland.com US Site, including, without limitation, personally identifiable information and aggregate information concerning users and customers, to one or more affiliated or unaffiliated third parties. \r\nIn any event, your personal data will not be disclosed to third parties without you being informed or without your consent, when such consent is required by law.\r\n\r\n6. HOW DO WE COLLECT YOUR DATA ON www.stoneisland.com \r\nCookies\r\nWhen you are using the www.stoneisland.com US Site, some personal data may be collected automatically through so-called \"cookies\". A cookie is a device transmitted to the hard drive of an Internet user. While cookies do not contain intelligible information, they allow us to link an Internet user to personal information provided by such user through the www.stoneisland.com US Site. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY process information collected by cookies in a collective and anonymous way, in order to optimize our services and the www.stoneisland.com US Site for the needs and preferences of its users. We use cookies to collect users' IP addresses and other information regarding users' data traffic or preferences in the choice of services provided and products purchased through the www.stoneisland.com US Site.\r\nWe disseminate cookies in connection with functions such as browsing the catalogue, purchasing products on-line and supplying \"My Account\" services.\r\nAs you may know, each Internet browser allows the deletion of cookies after each session. Your Internet browser contains instructions on how to carry out these procedures of deletion. Please access the appropriate instructions section on your Internet browser if you wish to delete cookies. \r\nYour acceptance of our automatic procedures of collection of data and the use of cookies is necessary to take advantage of many features and services offered by the www.stoneisland.com US Site, including the purchase of products. If you set your browser to block or delete cookies, we cannot guarantee that you will have access to all the features and services offered by the US Site (for example, your computer may not be able to display the image of the product you are in the process of purchasing).\r\nOther Methods of Collecting User Information. \r\nYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY directly collect personal data and information from users when they register on-line with the www.stoneisland.com US Site or when they send purchase orders for products sold on the www.stoneisland.com US Site in order to finalize their transactions.\r\n\r\n7. SECURITY MEASURES\r\nWe have adopted security measures to protect personal data against accidental or unlawful destruction, loss, alteration, unauthorized disclosure or access and against other unlawful forms of data processing, as provided in our Privacy Policy. \r\nNevertheless, YYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY cannot guarantee that the security measures adopted for the protection of the www.stoneisland.com US Site and the transmission of data and information through the www.stoneisland.com US Site will prevent or exclude any risk of unauthorized access to or loss of data. It is advisable that your computer be equipped with software devices for the protection of network data transmission and receipt (such as, updated antivirus systems) and that your Internet service provider take appropriate measures for the security of network data transmission (such as, firewalls and anti-spam filtering).\r\n\r\n8. OPT-IN/OPT OUT Advertising material and direct marketing or other commercial communications which are not specifically requested by you or necessary to provide a service you requested, including the purchase of products on the US Site, will be sent to you only after we receive your consent. Please note that each time your consent is required, we will inform you in advance and we will give you the option to either provide or refuse your consent by selecting the appropriate box.\r\nYOOX and STONE ISLAND and STONE ISLAND DENIMS may process your personal data without your consent when such processing is necessary to comply with applicable laws and regulations or to provide you with services you requested, including the purchase of products on the US Site.\r\nEven when your prior consent is not necessary, you may exercise, at any time, your right not to receive future communications regarding services you requested, such as the Newsletter.\r\n\r\n9. YOUR RIGHT TO ACCESS PERSONAL DATA AND FURTHER RIGHTS\r\nYou are entitled to obtain, at any time, confirmation from YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY as to whether or not data relating to you is being processed, even if not yet registered, and the communication of any such data in an intelligible form. \r\nMoreover, you are entitled to receive from YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY information on the source from which we received your personal data; the purposes and means of processing your personal data; the logic involved in any electronic data processing; information regarding the data controller and the data processors and the names of subjects and categories of subjects to whom your personal data may be disclosed or who may access your personal data (for example, the names of data processors). You can also find the above information in our Privacy Policy. \r\nYou are entitled to obtain at any time from YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY:\r\n\t•\tthe updating, rectification or integration of your personal data;\r\n\t•\tthe deletion, transformation into anonymous form or blocking of your personal data, which are processed in violation of the law, including when the storage of data is not necessary for the purposes for which it has been collected and subsequently processed;\r\n\t•\tthe confirmation that the operations under letters a) and b) have been reported to whom the data were disclosed or disseminated, except when it becomes impossible to do so or if it means exceeding the protection of the right you are claiming.\r\nYou are entitled to object, in all or in part:\r\n\t•\tfor legitimate reasons, to the processing of your personal data, even if it is related to the purposes for which it was collected;\r\n\t•\tto the processing of your personal data for advertising or direct marketing purposes or in order to carry out marketing research or commercial communications.\r\nYou may freely and at any time exercise your rights, provided that you do so in compliance with applicable laws and regulations, by sending your request to YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY at the following e-mail address: privacy@mail.stoneisland.com.\r\n\r\n10. LINKS TO OTHER WEB SITES\r\nThe www.stoneisland.com US Site may provide hyperlinks to third party websites (the \"Third Party Websites\"). YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY do not operate, control, endorse or guarantee any Third Party Websites. You agree that and SPORTSWEAR COMPANY are not responsible for any content, services and/or products provided by any Third Party Website, nor are YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY responsible for any practice followed by such Third Party Website with respect to the collection and processing of personal data of their users. When you access any Third Party Website through a hyperlink posted on the www.stoneisland.com US Site, please carefully read the Privacy Policy and other policies of such Third Party Website.\r\nOur Privacy Policy and other policies do not apply to any Third Party Website. YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY provide hyperlinks to Third Party Websites only for the convenience of our users. By providing hyperlinks to Third Party Websites, YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY do not recommend that users access such Third Party Websites.\r\nYOU AGREE THAT YOUR USE OF ANY THIRD PARTY WEBSITE IS AT YOUR SOLE RISK AND WITHOUT WARRANTIES OF ANY KIND BY YOOX, YOOX USA, AND/OR SPORTSWEAR COMPANY, EXPRESSED, IMPLIED OR OTHERWISE, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY OR NONINFRINGEMENT. UNDER NO CIRCUMSTANCES ARE YOOX, YOOX USA, AND/OR SPORTSWEAR COMPANY LIABLE FOR DAMAGES ARISING FROM ANY TRANSACTION BETWEEN YOU AND ANY THIRD PARTY WEBSITE OR FOR ANY INFORMATION APPEARING ON THIRD PARTY WEBSITES. \r\n\r\n11. CONTACTS\r\nIf you wish to receive further information regarding our privacy practices, please contact us at the following e-mail address: privacy@mail.stoneisland.com. For more information regarding your rights under the Italian Data Protection Code, please go to the web site of the Italian Data Protection Authority at www.garanteprivacy.it. \r\n\r\n12. GOVERNING LAW\r\nThe processing of personal data by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY will be conducted in compliance with applicable US laws. The laws of Italy, including the Italian Personal Data Protection Code (Legislative Decree no. 196 dated June 30, 2003), also apply to the processing of personal data carried out by YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY (see the Companies of YOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY Group). The Italian Personal Data Protection Code guarantees that the processing of your personal data will be carried out in compliance with the fundamental rights and freedoms of individuals and their dignity, with particular reference to confidentiality, identity and the right to personal data protection. \r\n\r\n13. MODIFICATION AND UPDATING\r\nYOOX NET-A-PORTER GROUP and SPORTSWEAR COMPANY may amend or update from time to time all or any part of this Privacy Policy, whether or not required by a change in the applicable laws and regulation. Our users will be notified of any amendment to or update of our Privacy Policy on our homepage. All amendments and updates will become effective upon publication on this section of the www.stoneisland.com US Site. You should regularly access this section of the www.stoneisland.com US Site in order to review the most recent and updated version of our Privacy Policy.", + "__index": "2", + "dateCreated": "Tue, 17 Nov 2015 20:32:07 GMT", + "tag": "privacy" + }, + { + "id": "returns-policy", + "title": "Returns Policy", + "image": { + "uri": "", + "caption": "" + }, + "body": "\r\nWe want to make sure that you are completely satisfied with your purchases on this Site. If, for any reason, you are not satisfied with your order, you may return any UNUSED products within twenty (20) days from the date of delivery. Before sending any products back to us, please make sure that all of the following conditions have been correctly satisfied. \r\nThe product you wish to return:\r\ncan be sent back to us only after you have completed and submitted the online Return Form available on the www.stoneisland.com US Site within twenty (20) days of delivery; by completing and submitting our online return form you will receive your Return Number, which you must include on your return shipping label;\r\nmust be unused, unworn, unwashed and in the same condition in which it was received by you;\r\nmust have all disposable seals still attached with the disposable seal that must still be intact;\r\nmust be returned complete with all of its parts and accessories;\r\nmust be sent in its original packaging;\r\nmust be shipped back to our fulfillment house within twenty (20) days of the date of delivery;\r\nmust be sent in one single shipment; products that belong to the same order must be returned to us at the same time; and\r\nmust be shipped from the United States.\r\nIf all of these conditions are satisfied, we will refund the value of the returned product(s), Sales Tax included, less any original shipping costs. If you send the package with UPS, return shipping costs charged to the customer will correspond to $6.00. If you prefer you can send the return at your expense, with a courier of your choice. We will not issue any refunds for returns that do not satisfy all of the conditions indicated above; provided, however, that you will have the option to request within thirty (30) days of being notified that you are not entitled to a refund that your merchandise be shipped back to you, at your own cost, in the condition in which it was received by Provider’s fulfillment house.\r\nIf you do not request the return of your merchandise within said thirty-day period, you authorize Provider, and any of its affiliates or agents, to dispose of such merchandise as it sees fit. \r\n\r\nSALES OF BEACHWEAR AND UNDERWEAR ARE FINAL. WE RESERVE THE RIGHT TO DESIGNATE ON THE SITE OTHER NON-RETURNABLE MERCHANDISE. ANY SUCH DESIGNATION WILL BE NOTED ON THE DETAIL PAGE OF THE MERCHANDISE WHICH IS NON-RETURNABLE. \r\n\r\nREFUND POLICY\r\nRefunds are processed within approximately three (3) business days of our receipt of your merchandise. Your refund will be credited back to the same payment method used to make the original purchase on the US Site. If you paid by credit card, refund times will depend on the credit or debit card company’s policies. Be aware that the refund date for the credit will coincide with the date of the original payment, therefore you will not be charged any interest fees. If you paid by PayPal (where available), refunds will be credited to your PayPal account and will be visible immediately. The date of reimbursement to the credit card associated with your PayPal account depends on the company that issued the card. WE OFFER NO REFUNDS ON ANY PRODUCTS DESIGNATED ON THIS SITE AS NON-RETURNABLE. \r\n\r\nIDENTIFICATION TAG\r\nAll of our products come with an identification tag with a disposable seal. Please try your item on before removing the tag and seal, since we do not accept returns once the disposable seal has been removed, broken or damaged in any way. Shoes come with a sticker under the sole; if you remove or alter this sticker, you may no longer return your purchase. \r\n\r\nUPS\r\nYour return can be sent to us by UPS, using the pre-printed label which you can find within the original shipment. If you send the package with UPS, return shipping costs charged to the customer will correspond to $6.00. Please visit http://www.ups.com/dropoff?loc=en_US to find the UPS drop-off location nearest to you. If you prefer you can send the return at your expense, with a courier of your choice. We are not responsible for any loss or damage to products if you ship your return without using UPS. \r\n\r\nWE OFFER NO EXCHANGES ON MERCHANDISE PURCHASED ON THE www.stoneisland.com US SITE\r\n\r\nDISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY\r\n\r\nPROVIDER MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, AS TO THE PRODUCTS INCLUDED ON THE SITE NOR AS TO THE MERCHANDISE BEING SOLD TO YOU. TO THE FULLEST EXTENT PERMISSIBLE BY APPLICABLE LAW, PROVIDER DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT, AND THERE ARE NO WARRANTIES, EXPRESS OR IMPLIED, WHICH EXTEND BEYOND THE DESCRIPTION OF THE MERCHANDISE CONTAINED ON OUR ORDER CONFIRMATION. PROVIDER WILL NOT BE LIABLE FOR ANY DAMAGES OF ANY KIND ARISING FROM THE USE OF THE SITE, INCLUDING BUT NOT LIMITED TO DIRECT, INDIRECT, INCIDENTAL, PUNITIVE AND CONSEQUENTIAL DAMAGES. \r\n\r\nCERTAIN STATE LAWS DO NOT ALLOW LIMITATIONS ON IMPLIED WARRANTIES OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF THESE LAWS APPLY TO YOU, SOME OR ALL OF THE ABOVE DISCLAIMERS, EXCLUSIONS, OR LIMITATIONS MAY NOT APPLY TO YOU, AND YOU MIGHT HAVE ADDITIONAL RIGHTS.\r\n\r\nForce Majeure\r\nProvider shall not be liable for any delay or failure in performance caused by circumstances beyond its reasonable control.", + "__index": "3", + "dateCreated": "Tue, 17 Nov 2015 21:03:44 GMT", + "tag": "returns" + }, + { + "id": "customer-care", + "title": "Customer Care", + "image": { + "uri": "", + "caption": "" + }, + "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam blandit in risus sit amet maximus. Phasellus ullamcorper auctor fermentum. Aenean diam libero, rhoncus vel efficitur sed, dictum vel neque. Aliquam mollis leo vitae est vehicula, non pulvinar elit congue. Phasellus sit amet mauris neque. Integer volutpat nisl est, vel finibus purus lacinia vehicula. Proin dapibus velit quis sapien ultricies accumsan. Sed accumsan dui id porta efficitur.\r\n\r\nCurabitur pretium ut libero a varius. Morbi in lacinia felis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nullam dolor justo, consequat eu lectus at, interdum sollicitudin arcu. Nunc accumsan velit volutpat, venenatis leo eu, rhoncus nibh. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Phasellus semper consequat ipsum, sed fringilla ligula tincidunt at.\r\n\r\nMauris vehicula, purus ut iaculis facilisis, mi leo dignissim libero, at lobortis lectus odio consequat urna. Etiam accumsan volutpat nibh, eget ultricies mi feugiat eu. Duis id aliquam enim. Pellentesque quis enim eu dolor bibendum interdum. Cras ultrices erat velit, eu volutpat erat consequat non. Nam ut nibh facilisis, egestas sapien vitae, scelerisque sapien. Nullam tortor ex, convallis vel nisi vitae, efficitur dapibus nunc. In hac habitasse platea dictumst. Nam posuere ligula lorem, sit amet ultricies odio tristique in. Etiam gravida tincidunt mollis. Duis quis nulla ligula. Etiam ut vehicula tellus. Sed ipsum lacus, tincidunt sit amet velit et, aliquet hendrerit erat. Nam sed velit dapibus, congue odio non, ultrices ligula. Suspendisse at quam eu lorem finibus ultricies id tempus lorem. Nulla vel quam luctus, viverra nulla cursus, faucibus tellus.\r\n\r\nPraesent magna ex, posuere at hendrerit varius, auctor a nisl. Nullam sodales erat ut nisl vestibulum luctus. Donec id sagittis orci. Cras imperdiet, erat non dictum feugiat, elit turpis viverra neque, interdum cursus mi turpis vitae dolor. Suspendisse potenti. Aenean et auctor diam, vel eleifend eros. Praesent viverra felis at enim elementum fermentum. Etiam convallis, elit porta molestie condimentum, arcu ligula vestibulum nisi, et aliquet massa tellus quis eros. Aliquam a dignissim tellus, non ullamcorper purus. Phasellus in risus mattis dui vehicula cursus in at urna.\r\n\r\nCurabitur laoreet lorem eu euismod volutpat. Suspendisse vulputate aliquet tempor. Pellentesque purus augue, eleifend a maximus eu, commodo nec felis. Mauris mattis turpis nec volutpat tincidunt. Mauris imperdiet ante at orci mollis sagittis. Etiam lacus risus, consectetur ut dui non, pulvinar pulvinar libero. Aliquam ut rhoncus justo, quis sollicitudin nisi. Proin et iaculis sem. Pellentesque id tempor elit, et tincidunt nunc. Quisque laoreet et massa quis imperdiet. Morbi dapibus, felis sed auctor porttitor, massa nunc sollicitudin urna, non congue odio enim eget nisi. Suspendisse semper vehicula nisl vitae vehicula. Maecenas sed justo quis nisi auctor ultrices. Nam vel dolor fringilla, accumsan nulla eu, rutrum ex. Donec ante quam, molestie vel ex eget, dictum luctus nunc. Phasellus tincidunt libero non quam finibus, at convallis sem laoreet.\r\n\r\nDonec consequat, leo tincidunt elementum consectetur, nisl augue sollicitudin dolor, vel fringilla dui lorem non enim. Morbi id arcu felis. Integer malesuada ex enim, sed consectetur massa condimentum id. In mollis libero eu neque sollicitudin, sit amet interdum orci bibendum. Curabitur tincidunt purus vel vestibulum placerat. Aliquam erat volutpat. Praesent ac eros diam. Mauris ultrices euismod sodales. Vestibulum dui leo, auctor sit amet finibus eu, suscipit eu diam. Cras ac rhoncus turpis, at sagittis mi. Praesent urna metus, euismod vitae nunc eget, suscipit auctor lectus. Pellentesque maximus arcu justo. Duis mi arcu, rutrum et vulputate nec, mattis sit amet risus. Donec posuere velit sed enim accumsan, eu lobortis nulla sagittis.\r\n\r\nDonec viverra consectetur turpis sit amet malesuada. Sed sit amet urna luctus, sodales est porta, aliquam mi. Curabitur et ullamcorper odio, dapibus facilisis nisl. Fusce tortor leo, mattis sit amet massa ut, ultrices aliquam massa. Pellentesque consectetur metus in molestie egestas. Quisque vehicula at mauris ut eleifend. Duis eu ipsum quis ipsum bibendum luctus.\r\n\r\nSed sed viverra diam. Quisque lacinia nisl orci. Fusce vulputate dui ut nunc vulputate feugiat. Praesent felis quam, semper nec dapibus eget, venenatis vitae leo. Maecenas rutrum egestas dapibus. Vestibulum sodales molestie varius. Ut ac laoreet est, nec posuere ipsum. Cras ac eros sapien. Quisque eu dui lorem. Donec congue varius tortor ac ullamcorper. Curabitur vulputate faucibus finibus. Donec tellus neque, euismod ac aliquet at, vehicula in mauris. Vivamus justo nulla, maximus sit amet quam ac, vulputate dapibus purus. Mauris ante urna, posuere varius vehicula sed, fringilla sed quam. In eget ex tincidunt, ultrices elit id, congue quam. Suspendisse congue tristique dolor, rhoncus venenatis purus tempor at.\r\n\r\nVivamus efficitur, odio in tempor rutrum, quam nunc congue orci, non posuere lorem lacus et arcu. Aenean sit amet diam quis dui dapibus semper ac vitae est. Aenean ornare arcu justo, id sodales odio maximus interdum. Curabitur sit amet augue pretium metus bibendum imperdiet vitae vitae nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc euismod ante eu justo mollis dignissim. Maecenas et velit eu lorem laoreet ornare. Sed accumsan est nec rutrum dignissim.\r\n\r\nIn bibendum mattis ligula. Pellentesque gravida felis sed congue viverra. Nam volutpat quam at velit sodales, nec egestas dolor consectetur. Etiam id tortor tincidunt, sollicitudin risus ut, lacinia diam. Morbi consequat euismod justo vitae sagittis. Pellentesque interdum orci ligula, tincidunt maximus nulla sollicitudin sed. Duis finibus odio eros, eget consequat ante tristique ac. Suspendisse at interdum leo. Nunc sagittis ante ac felis iaculis fermentum. Sed elementum dictum dictum. Aliquam eget metus molestie, varius mi ac, auctor quam.", + "__index": "4", + "dateCreated": "Tue, 17 Nov 2015 21:03:57 GMT", + "tag": "care" + } + ], + "store": [ + { + "id": "stone-island", + "title": "Stone Island", + "StoreIsOpen": "false", + "ClosedStoreImages": [ + { + "uri": "https://ltho.s3.amazonaws.com/27b2926b-e9a9-4c7f-9065-697f4eefec84.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/b9bbf830-a130-4b50-8850-c831d1922312.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/45d74d7a-a48f-48b5-99ff-aab2936e78d8.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/4ec8dfae-a1e4-42dd-ad62-8d30def7811d.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/7ea1a112-d06f-483c-8f13-afc05f36bba6.jpg", + "caption": "" + }, + { + "uri": "https://ltho.s3.amazonaws.com/46593109-646d-459f-86ac-8da950a27841.jpg", + "caption": "" + } + ], + "__index": "0", + "dateCreated": "Fri, 20 Nov 2015 00:45:03 GMT", + "collection": "STONE ISLAND FW_'015 '016", + "FitsLarge": "false", + "BackgroundIsGray": "true", + "CollectionId": "8822" + } + ] +} \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html index 03d4a958..7249e157 100644 --- a/StoneIsland/platforms/ios/www/index.html +++ b/StoneIsland/platforms/ios/www/index.html @@ -100,6 +100,7 @@
HUB
STORY
ARCHIVE
+ +40° 58' 90" -74° 04' 46" @@ -138,7 +139,7 @@

HUB

@@ -508,13 +507,16 @@
You have no orders.
@@ -741,7 +743,7 @@
- @@ -775,7 +776,7 @@
@@ -861,17 +862,25 @@
-
- THANK YOU -

- Please check your inbox for your confirmation email. -

+
+ THANK YOU +

+ Please check your inbox for your confirmation email. +

+
+
+ +
+
+ WE'RE SORRY +

+
@@ -1078,6 +1087,7 @@ + diff --git a/StoneIsland/platforms/ios/www/js/index.js b/StoneIsland/platforms/ios/www/js/index.js index e6bdf49f..573ce720 100644 --- a/StoneIsland/platforms/ios/www/js/index.js +++ b/StoneIsland/platforms/ios/www/js/index.js @@ -2,11 +2,12 @@ var app = (function(){ var app = {} app.init = function(){ + + sdk.init({ env: "test" }) + app.bind() app.build() - - sdk.init({ env: "test" }) - + app.iscroll_options = { mouseWheel: true, scrollbars: true, @@ -69,7 +70,12 @@ var app = (function(){ app.view = null app.router = new SiteRouter () - app.account.connect( app.router.launch.bind(app.router) ) + if (sdk.env == "test") { + app.router.launch() + } + else { + app.account.connect( app.router.launch.bind(app.router) ) + } $("body").removeClass("loading") } diff --git a/StoneIsland/platforms/ios/www/js/lib/_router.js b/StoneIsland/platforms/ios/www/js/lib/_router.js index 23daf4c7..b1fa1c97 100644 --- a/StoneIsland/platforms/ios/www/js/lib/_router.js +++ b/StoneIsland/platforms/ios/www/js/lib/_router.js @@ -36,6 +36,7 @@ var SiteRouter = Router.extend({ '/cart/shipping': 'cart.shipping', '/cart/confirm': 'cart.confirm', '/cart/thanks': 'cart.thanks', + '/cart/error': 'cart.error', }, initialize: function(){ diff --git a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js index 22b310de..bba959bd 100644 --- a/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js +++ b/StoneIsland/platforms/ios/www/js/lib/auth/SignupView.js @@ -4,7 +4,8 @@ var SignupView = FormView.extend({ action: sdk.account.signup, last_data: null, - + +/* test_data: { "Email": "testit.account" + Math.floor(Math.random() * 10000000) + "@yoox.com", "Password": "TestPassword", @@ -16,7 +17,8 @@ var SignupView = FormView.extend({ "DataProfiling": true, "DataProfiling2": true, }, - +*/ + events: { "click .privacy-msg": "privacy_link", "submit form": "save", @@ -47,6 +49,7 @@ var SignupView = FormView.extend({ "Surname": "Please enter your last name.", "Email": "Please enter a valid email address.", "ConfirmEmail": "Please enter a valid email address.", + "BirthDay": "Please enter your birthday.", "Password": "Please enter your password.", "Password2": "Please enter your password again.", "DataProfiling": "You must agree to data profiling.", @@ -97,7 +100,13 @@ var SignupView = FormView.extend({ }, error: function(data){ - console.log('error', data) + try { + data = JSON.parse(data.responseText) + app.signup.show_errors([[ 'Name', data['Error']['Description'] ]]) + } + catch (e) { + app.signup.show_errors([[ 'Name', "There was an unknown error." ]]) + } }, cancel: function(){ diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js index f0a796bf..c156aed0 100644 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/ArchiveView.js @@ -6,6 +6,12 @@ var ArchiveView = ScrollableView.extend({ events: { "click .item": "pick", + "mousedown .row": "mousedown", + "touchstart .row": "touchstart", + "mousemove .row": "mousemove", + "touchmove .row": "touchmove", + "mouseup .row": "mouseup", + "touchend .row": "touchend", }, initialize: function(){ @@ -20,9 +26,11 @@ var ArchiveView = ScrollableView.extend({ app.header.set_back(false) }, - pick: function(){ + pick: function(e){ this.$el.removeClass("menu") - app.header.set_back(true) + app.header.set_back(true) + var index = $(e.currentTarget).data("index") + this.populateDecade(index) }, show: function(){ @@ -41,11 +49,6 @@ var ArchiveView = ScrollableView.extend({ // id title images[ uri label code caption ] this.data.forEach(function(row, index){ - var t = this.row_template.replace(/{{image}}/, row.images[0].uri) - .replace(/{{label}}/, row.images[0].label) - .replace(/{{code}}/, row.images[0].code) - .replace(/{{caption}}/, row.images[0].caption) - this.$content.append(t) var t = this.menu_template.replace(/{{title}}/, row.title) var $t = $(t) @@ -56,6 +59,68 @@ var ArchiveView = ScrollableView.extend({ this.back() this.deferScrollToTop() + + this.populateDecade(0, 3) + }, + + populateDecade: function(index, count){ + this.$content.empty() + + var loader = new Loader() + + var row = this.data[index] + + row.images.forEach(function(cell, i){ + if (i > count) return + var $t = $("
") + $t.addClass("row").addClass("loading") + var t = this.row_template.replace(/{{image}}/, cell.uri) + .replace(/{{label}}/, cell.label) + .replace(/{{code}}/, cell.code) + .replace(/{{caption}}/, cell.caption) + $t.html(t) + this.$content.append($t) + + loader.preloadImage(cell.uri, function(){ + $t.removeClass('loading') + }.bind(this)) + }.bind(this)) + }, + +// ['transformProp'] = "translateZ(0) translateX(-50%) translateY(-50%) "; +// .image, .text + + touchstart: function(e){ + this.$row = e.currentTarget + this.mousedown(e.touches[0]) + }, + touchmove: function(e){ + this.mousemove(e.touches[0]) + }, + touchend: function(e){ + this.mouseup() + }, + mouse: { x: 0, y: 0 }, + $row: null, + + mousedown: function(e){ + this.$row = this.$row || e.currentTarget + this.mouse.x = e.pageX + this.mouse.y = e.pageY + }, + mousemove: function(e){ + var dx = ( this.mouse.x - e.pageX ) / window.innerWidth + var dy = ( this.mouse.y - e.pageY ) / window.innerWidth + this.$row.style['transformProp'] = [ + "translateZ(0)", + "translateX(-50%)", + "translateY(-50%)", + "rotateY(" + dx + "deg)", + ].join(" ") + }, + mouseup: function(e){ + this.mouse.x = this.mouse.y = 0 + this.$row = null }, }) \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js index 3ea35418..ddfff9e6 100644 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/BlogView.js @@ -10,7 +10,7 @@ var BlogView = View.extend({ fetch: function(){ $.ajax({ method: "GET", - url: "http://stone.sup.land/db.json", + url: sdk.env == 'test' ? '/db.json' : "http://stone.sup.land/db.json", success: this.success.bind(this), cache: true, }) @@ -21,11 +21,10 @@ var BlogView = View.extend({ if (this.loaded) return this.loaded = true - this.data = data + this.data = data = typeof data == "string" ? JSON.parse(data) : data + + app.archive.populate(data.archive) - this.loader.preloadImage(data.archive[0].images[0].uri, function(img){ - app.archive.populate(data.archive) - }) this.loader.preloadImage(data.hub[0].image[0].uri, function(img){ app.hub.populate(data.hub) }) @@ -54,7 +53,7 @@ var BlogView = View.extend({ app.gallery_id = data.store[0].CollectionId - app.collection.fetch() + // app.collection.fetch() }, }) \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js index a6ae958e..49c05ff6 100644 --- a/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js +++ b/StoneIsland/platforms/ios/www/js/lib/blogs/HubView.js @@ -4,15 +4,17 @@ var HubView = ScrollableView.extend({ template: $("#hub .template").html(), events: { + "click .share": "content-share", "click .store": "store_link", "click .gallery-left": "gallery_left", "click .gallery-right": "gallery_right", + "click .play": "play_video", }, initialize: function(){ this.$content = this.$(".content") this.$loader = this.$(".loader") - this.scroller = new IScroll('#hub', app.iscroll_optionsx) + this.scroller = new IScroll('#hub', app.iscroll_options) }, show: function(){ @@ -21,14 +23,16 @@ var HubView = ScrollableView.extend({ document.body.className = "hub" }, + galleries: {}, populate: function(data){ this.data = data this.$loader.hide() this.$content.empty() + this.galleries = {} // id date subtitle body link store image[uri caption] this.data.forEach(function(row){ // console.log(row) - var t = this.template.replace(/{{id}}/, row.id) + var t = this.template.replace(/{{id}}/g, row.id) .replace(/{{date}}/, moment(row.date).format("MM.DD.YYYY")) .replace(/{{title}}/, row.title) .replace(/{{subtitle}}/, row.subtitle) @@ -49,7 +53,7 @@ var HubView = ScrollableView.extend({ el.className = "item" $gallery.append(el) }) - new Flickity( ".gallery-" + row.id, { + this.galleries[row.id] = new Flickity( ".gallery-" + row.id, { selector: '.item', cellAlign: 'center', autoPlay: false, @@ -68,6 +72,7 @@ var HubView = ScrollableView.extend({ el.style.backgroundImage = "url(" + row.image[0].uri + ")" el.className = "item" $(".gallery-" + row.id).append(el) + $(".gallery-" + row.id).data("row", row) // video, append play button if (row.link.match(/youtube|youtu.be|vimeo/)) { @@ -75,8 +80,8 @@ var HubView = ScrollableView.extend({ play.className = "play" $(".gallery-" + row.id).append(play) } - $t.find("gallery-left").remove() - $t.find("gallery-right").remove() + $t.find(".gallery-left").remove() + $t.find(".gallery-right").remove() } }.bind(this)) @@ -87,12 +92,22 @@ var HubView = ScrollableView.extend({ store_link: function(){ app.router.go("store") }, + play_video: function(e){ + var row = $(e.currentTarget).closest('.gallery-video-post').data("row") + window.open(row.link, '_system') + }, - gallery_prev: function(e){ - $(e.currentTarget).closest("hub_item").flickity('prev') + gallery_left: function(e){ + var id = $(e.currentTarget).closest(".hub_item").data('id') + this.galleries[id].previous() + }, + gallery_right: function(e){ + var id = $(e.currentTarget).closest(".hub_item").data('id') + this.galleries[id].next() }, - gallery_next: function(e){ - $(e.currentTarget).closest("hub_item").flickity('next') + + share: function(){ + window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/") }, }) \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js index aa6ec9e4..f6c7f1f5 100644 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartConfirm.js @@ -2,11 +2,26 @@ var CartConfirm = FormView.extend({ el: "#cart_confirm", + template: $("#cart_confirm .template").html(), + events: { }, initialize: function(opt){ this.parent = opt.parent + this.$rows = this.$(".rows") + this.$subtotal = this.$(".subtotal") + this.$shipping = this.$(".shipping") + this.$tax = this.$(".tax") + this.$total = this.$(".total") + + this.$shipping_address = this.$(".shipping_address") + this.$shipping_method = this.$(".shipping_method") + + this.$payment_name = this.$(".payment_name") + this.$payment_method = this.$(".payment_method") + this.$payment_address = this.$(".payment_address") + this.scroller = new IScroll('#cart_confirm', app.iscroll_options) }, @@ -16,15 +31,144 @@ var CartConfirm = FormView.extend({ app.footer.show("PLACE ORDER", "CANCEL") window.location.hash = "#/cart/confirm" this.deferScrollToTop() + + app.curtain.show("loading") + promise(sdk.cart.get_status).then( this.populate.bind(this) ) }, - populate: function(){ + populate: function(data){ + console.log(data) + + data = data.Cart + + this.$rows.empty() + + data.Items.forEach(function(item){ + var $el = $("
") + this.$rows.append($el) + var code_ten = item.Code10 + var size_id = item.Size + + var code = code_ten.substr(0, 8) + app.product.find(code, function(data, details){ + var descriptions = app.product.get_descriptions( details ) + + var name_partz = descriptions['ModelNames'].split(' ') + var num = name_partz.shift() + var title = name_partz.join(' ') + var type = title_case( descriptions['MicroCategory'] ) + + var color_name, size_name + + details.Item.ModelColors.some(function(color){ + if (color['Code10'] == code_ten) { + color_name = color['ColorDescription'] + return true + } + return false + }) + + details.Item.ModelSizes.some(function(size){ + if (size['SizeId'] == size_id) { + // console.log(size) + size_name = size['Default']['Text'] + size_name = SIZE_LOOKUP[ size_name ] || size_name + if (! size_name && ! size['Default']['Labeled']) { + size_name = size['Default']['Text'] + " " + size['Default']['ClassFamily'] + } + + return true + } + return false + }) + +// size_name = item.DefaultSize + " " + item.DefaultSizeClassFamily + + var t = this.template + .replace(/{{image}}/, sdk.image(item['Code10'], '11_f')) + .replace(/{{sku}}/, num) + .replace(/{{title}}/, title) + .replace(/{{type}}/, type) + .replace(/{{size}}/, size_name || "DEFAULT") + .replace(/{{color}}/, color_name || "DEFAULT") + .replace(/{{quantity}}/, 1) + .replace(/{{price}}/, as_cash(details.Item.Price.DiscountedPrice)) + $el.data("price", details.Item.Price.DiscountedPrice) + $el.html(t) + this.refreshScroller() + }.bind(this)) + }.bind(this)) + + var subtotal = data.Totals.TotalWithoutPromotions + var shipping_cost = data.DeliveryMethod.Selected.Amount.Total + var tax = data.Totals.TotalSalesTax + var total = data.Totals.TotalToPay + + this.$subtotal.html( as_cash(subtotal) ) + this.$shipping.html( as_cash(shipping_cost) ) + this.$tax.html( as_cash(tax) ) + this.$total.html( as_cash(total) ) + + var street = data.Receiver.StreetWithNumber.replace(/\n$/,"").replace("\n", ", ") + var address = data.Receiver.Name.toUpperCase() + " " + data.Receiver.Surname.toUpperCase() + "
" + street + ", " + address += data.Receiver.City + ", " + data.Receiver.Region + " " + data.Receiver.PostalCode + + this.$shipping_address.html(address) + this.$shipping_method.html(data.DeliveryMethod.Selected.Type == 1 ? "* STANDARD SHIPPING" : "* EXPRESS SHIPPING") + + var cc = data.Payment.CreditCard + var cc_street = cc.HolderAddress.replace(/\n$/,"").replace("\n", ", ") + var cc_type = cc.Type == "AmericanExpress" ? "American Express" : cc.Type + + this.$payment_name.html( cc.HolderName.toUpperCase() + " " + cc.HolderSurname.toUpperCase() ) + this.$payment_method.html( cc_type.toUpperCase() + " XXXX-XXXX-XXXX-" + cc.Last4 ) + + app.curtain.hide("loading") }, save: function(){ + promise(sdk.cart.finalize, {}).then(function(){ + app.router.go('cart/thanks') + }.bind(this)).error(function(data){ + // {"Header":{"StatusCode":403,"Description":"403 Forbidden"},"Error":{"Description":"GenericApiError:CartAlreadyClosed"}} + // {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\\"Item has been removed from cart because it is no longer available.\\"\\n235"}}' + // {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\"The cart cannot be empty.\"\n233"}} + // {"Header":{"StatusCode":409,"Description":"304 NotModified"},"Error":{"Description":"FinalizationError:\"The reciever validation fails."}} + // {"Header":{"StatusCode":440,"Description":"304 NotModified"},"Error":{"Description":"GenericApiError:CartFinalizationNotYetCompleted"}} + // {"Header":{"StatusCode":441,"Description":"304 NotModified"},"Error":{"Description":"GenericApiError:EmptyCreditCard"}} + switch (data.StatusCode) { + case 403: // cart already closed + auth.clear_cart(auth.create_cart) + app.router.go('thanks') + break + case 409: // finalization error + this.finalization_error(data) + break + case 440: // genericapierror (credit card error!) + case 441: // genericapierror (credit card empty) + app.router.go('cart/payment') + app.cart.payment.show_errors([["Number","There was a problem with your credit card."]]) + break + } + }.bind(this)) + }, + + finalization_error: function(data){ + if (data['Error']['Description'].match(/receiver validation fails/)) { + app.router.go('cart/shipping') + app.cart.payment.show_errors([["Number","There was a problem with your credit card."]]) + } + else if (data['Error']['Description'].match(/cart cannot be empty/)) { + app.router.go('cart/summary') + } + else if (data['Error']['Description'].match(/Item has been removed/)) { + app.router.go('cart/error') + app.cart.error.show_error("We're sorry, but one or more items was out of stock. Please check your cart and try again.") + } }, cancel: function(){ + app.router.go('cart/payment') }, }) \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartError.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartError.js new file mode 100644 index 00000000..f9a1963e --- /dev/null +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartError.js @@ -0,0 +1,28 @@ +var CartError = View.extend({ + + el: "#cart_error", + + events: { + }, + + initialize: function(opt){ + this.parent = opt.parent + this.$error = this.$(".errrrrrrrrrrrrrrr") + }, + + show: function(){ + document.body.className = "cart" + app.cart.el.className = "error" + app.footer.show("< BACK TO CART") + app.footer.hide() + }, + + show_error: function(msg){ + this.$error.html(msg) + }, + + ok: function(){ + app.router.go("cart/summary") + }, + +}) \ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js index fec5e1d1..f3c54d55 100644 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartPayment.js @@ -2,13 +2,14 @@ var CartPayment = FormView.extend({ el: "#cart_payment", - address_template: $("#cart_payment .address_template").html(), + address_template: $("#cart_payment .address_row_template").html(), cc_template: $("#cart_payment .cc_template").html(), action: sdk.cart.set_credit_card, address_list_mode: false, cc_list_mode: false, + data: {}, events: { "change [name=SameAsShipping]": "toggle_shipping", @@ -28,6 +29,7 @@ var CartPayment = FormView.extend({ this.$cc_list = this.$(".cc_list") this.$cc_form = this.$(".cc") this.$cc_dropdown = this.$(".cc_dropdown") + this.$cc_confirm = this.$(".cc_confirm") this.address = new AddressView ({ parent: this, checkPhone: false }) this.cc = new CreditCardView ({ parent: this }) @@ -50,6 +52,7 @@ var CartPayment = FormView.extend({ setTimeout(function(){ var state = this.$same_as_shipping.prop("checked") this.$billing_address_rapper.toggle( ! state ) + this.address.disabled = state }.bind(this)) }, @@ -75,6 +78,7 @@ var CartPayment = FormView.extend({ this.cc.disabled = this.cc_list_mode this.$cc_form.toggle(! this.cc_list_mode) this.$cc_list.toggle(this.cc_list_mode) + this.$cc_confirm.toggle(this.cc_list_mode) }, populate: function(){ @@ -85,65 +89,94 @@ var CartPayment = FormView.extend({ this.toggle_cc( !! app.account.ccs.length ) app.account.ccs.forEach(function(cc){ - console.log(cc) - var address_t = this.address_template.replace(/{{id}}/g, cc.Id) .replace(/{{checked}}/g, cc.IsDefault ? "checked" : "") - .replace(/{{name}}/g, cc.Name + " " + cc.Surname) - .replace(/{{address}}/g, cc.Address.replace(/\n$/,"").replace("\n", "
")) + .replace(/{{name}}/g, (cc.Name + " " + cc.Surname).toUpperCase()) + .replace(/{{address}}/g, cc.Address.replace(/\n$/,"").replace("\n", ", ")) .replace(/{{city}}/g, cc.City) .replace(/{{state}}/g, cc.Province) .replace(/{{zip}}/g, cc.ZipCode) var cc_t = this.cc_template.replace(/{{id}}/g, cc.Id) .replace(/{{checked}}/g, cc.IsDefault ? "checked" : "") - .replace(/{{last4}}/g, cc.Last4) - .replace(/{{type}}/g, cc.Type) + .replace(/{{number}}/g, cc['Number']) + .replace(/{{type}}/g, cc.Type.toUpperCase()) .replace(/{{exp}}/g, cc.ExpirationMonth + "/" + cc.ExpirationYear) this.$address_list.append(address_t) this.$cc_list.append(cc_t) - }) + }.bind(this)) }, finalize: function(data){ - var shipping_info = {}, address_data, address_id, cc_info = {}, cc_data, cc_id + var shipping_info = {}, address_data, address_id, cc_info = {}, cc_data, cc_id var shipping_type = $("[name=ShippingType]").filter(function(){ return $(this).prop("checked") }).val() - if (this.list_mode) { - address_id = $("[name=AddressId]").filter(function(){ return $(this).prop("checked") }).val() + if (this.$same_as_shipping.prop("checked")) { + address_data = app.cart.shipping.data + } + else if (this.address_list_mode) { + address_id = this.$("[name=AddressId]").filter(function(){ return $(this).prop("checked") }).val() address_data = app.account.addressLookup[ address_id ] } else { address_data = data } + if (this.cc_list_mode) { - cc_id = $("[name=CCId]").filter(function(){ return $(this).prop("checked") }).val() + cc_id = this.$("[name=CCId]").filter(function(){ return $(this).prop("checked") }).val() cc_data = app.account.ccLookup[ cc_id ] + + var card_on_file = { + "guid": cc_data.Guid, + "cvv": this.$("[name=CvvConfirm]"), + } + + app.curtain.show("loading") + promise(sdk.cart.use_stored_credit_card, { data: card_on_file }).then(function(data){ + app.curtain.hide("loading") + this.success() + }.bind(this)).error(function(data){ + app.curtain.hide("loading") + console.log(data) + }.bind(this)) + + return } else { cc_data = data } - shipping_info.Name = address_data.Name - shipping_info.Surname = address_data.Surname - shipping_info.Email = auth.user.Email - shipping_info.Phone = address_data.Phone - shipping_info.Mobile = address_data.Phone - shipping_info.StreetWithNumber = address_data.Address - shipping_info.PostalCode = address_data.ZipCode - shipping_info.City = address_data.City - shipping_info.Province = address_data.Province - shipping_info.Region = address_data.Province - shipping_info.CountryCode = "US" + var credit_info = { + "HolderName": address_data.Name, + "HolderSurname": address_data.Surname, + "HolderAddress": address_data.Address || address_data.StreetWithNumber, + "HolderCity": address_data.City, + "HolderProvince": address_data.Province, + "HolderZip": address_data.PostalCode || address_data.ZipCode, + "HolderISOCountry": CANADIAN_LOOKUP[ address_data.Province ] ? "CA" : "US", + "HolderEmail": auth.user.Email, + "CardNumber": cc_data['Number'], + "Type": cc_data.Type, + "ExpirationMonth": cc_data.ExpirationMonth, + "ExpirationYear": cc_data.ExpirationYear.substr(2,3), + "Cvv": cc_data.Cvv, + } - return shipping_info + console.log( credit_info ) + + return credit_info }, success: function(){ app.router.go('cart/confirm') }, + error: function(data){ + console.log(data) + app.cart.payment.show_errors([["Number","There was a problem with your credit card."]]) + }, + cancel: function(){ app.router.go('cart/shipping') }, diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js index 9b8205c1..f17d42d2 100644 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartShipping.js @@ -5,6 +5,7 @@ var CartShipping = FormView.extend({ action: sdk.cart.set_shipping_address, list_mode: true, + data: {}, template: $("#cart_shipping .template").html(), @@ -44,8 +45,8 @@ var CartShipping = FormView.extend({ app.account.addresses.forEach(function(address){ var t = this.template.replace(/{{id}}/g, address.Id) .replace(/{{checked}}/g, address.IsDefault ? "checked" : "") - .replace(/{{name}}/g, address.Name + " " + address.Surname) - .replace(/{{address}}/g, address.Address.replace(/\n$/,"").replace("\n", "
")) + .replace(/{{name}}/g, (address.Name + " " + address.Surname).toUpperCase()) + .replace(/{{address}}/g, address.Address.replace(/\n$/,"").replace("\n", ", ")) .replace(/{{city}}/g, address.City) .replace(/{{state}}/g, address.Province) .replace(/{{zip}}/g, address.ZipCode) @@ -53,6 +54,22 @@ var CartShipping = FormView.extend({ }.bind(this)) }, + load_form: function(cart_data){ + var data = cart_data.Cart.Receiver + var addy = data.StreetWithNumber.split("\n") + data.Address1 = addy[0] || "" + data.Address2 = addy[1] || "" + data.ZipCode = data.PostalCode + data.Province = data.Region + this.load_data(data) + + this.data = data + if (cart_data.Cart.DeliveryMethod && cart_data.Cart.DeliveryMethod.Selected && cart_data.Cart.DeliveryMethod.Type) { + $("#standard-shipping").prop("checked", cart_data.Cart.DeliveryMethod.Type == 1) + $("#express-shipping").prop("checked", cart_data.Cart.DeliveryMethod.Type == 2) + } + }, + toggle_dropdown: function(state){ if (! app.account.addresses.length) { state = false @@ -84,7 +101,7 @@ var CartShipping = FormView.extend({ }) if (this.list_mode) { - address_id = $("[name=AddressId]").filter(function(){ return $(this).prop("checked") }).val() + address_id = this.$("[name=AddressId]").filter(function(){ return $(this).prop("checked") }).val() address_data = app.account.addressLookup[ address_id ] } else { @@ -103,6 +120,8 @@ var CartShipping = FormView.extend({ shipping_info.Region = address_data.Province shipping_info.CountryCode = CANADIAN_LOOKUP[ address_data.Province ] ? "CA" : "US" + this.data = shipping_info + return shipping_info }, diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js index 72c44405..ff1e001f 100644 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartSummary.js @@ -39,6 +39,7 @@ var CartSummary = ScrollableView.extend({ load: function(){ this.el.className = "loading" app.footer.show("SHIPPING >", "CANCEL") + app.curtain.show("loading") sdk.cart.get_status({ success: this.populate.bind(this), error: this.empty.bind(this), @@ -54,6 +55,7 @@ var CartSummary = ScrollableView.extend({ return this.empty() } + this.parent.$steps.show() this.updateCounts() this.$rows.empty() @@ -119,10 +121,15 @@ var CartSummary = ScrollableView.extend({ }.bind(this)) }.bind(this)) + if (data.Cart.Receiver && data.Cart.Receiver.City) { + app.cart.shipping.load_form( data ) + } + this.updateTotals() this.el.className = "full" this.refreshScroller() + app.curtain.hide("loading") }, updateCounts: function(){ @@ -133,7 +140,7 @@ var CartSummary = ScrollableView.extend({ updateTotals: function(){ var subtotal = this.data.Cart.Totals.TotalWithoutPromotions var shipping_cost = this.data.Cart.DeliveryMethod.Selected.Amount.Total - var tax = 0 + var tax = this.data.Cart.Totals.TotalSalesTax var total = this.data.Cart.Totals.TotalToPay this.$subtotal.html( as_cash(subtotal) ) @@ -148,6 +155,7 @@ var CartSummary = ScrollableView.extend({ this.parent.setHeaderCount( 0 ) this.parent.$itemcount.html("0 ITEMS") this.el.className = "empty" + this.parent.$steps.hide() }, save: function(){ diff --git a/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js index b57caadd..1b08e418 100644 --- a/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js +++ b/StoneIsland/platforms/ios/www/js/lib/cart/CartView.js @@ -14,7 +14,9 @@ var CartView = View.extend({ this.shipping = new CartShipping ({ parent: this }) this.confirm = new CartConfirm ({ parent: this }) this.thanks = new CartThanks ({ parent: this }) + this.error = new CartError ({ parent: this }) + this.$steps = this.$(".steps") this.$full_msg = this.$(".full_msg") this.$empty_msg = this.$(".empty_msg") this.$itemcount = this.$(".itemcount") diff --git a/StoneIsland/platforms/ios/www/js/lib/nav/CreditCardView.js b/StoneIsland/platforms/ios/www/js/lib/nav/CreditCardView.js index ba3ac54a..63784618 100644 --- a/StoneIsland/platforms/ios/www/js/lib/nav/CreditCardView.js +++ b/StoneIsland/platforms/ios/www/js/lib/nav/CreditCardView.js @@ -40,6 +40,7 @@ var CreditCardView = SerializableView.extend({ }, validate_fields: function(data, errors){ + if (this.disabled) { return } var card = this.$number.validateCreditCard(this.cardOptions) if (! card.valid) { errors.push([ "Number", "Your card number is invalid." ]) } if (! data.ExpirationMonth || data.ExpirationMonth == "NONE") { errors.push([ "ExpirationMonth", "Please enter the expiration month." ]) } diff --git a/StoneIsland/platforms/ios/www/js/lib/products/GalleryView.js b/StoneIsland/platforms/ios/www/js/lib/products/GalleryView.js index b36c5df2..02193f14 100644 --- a/StoneIsland/platforms/ios/www/js/lib/products/GalleryView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/GalleryView.js @@ -4,8 +4,8 @@ var GalleryView = View.extend({ template: $("#gallery .template").html(), events: { - "click .left": "prev", - "click .right": "next", +// "click .left": "prev", +// "click .right": "next", // "touchstart .gallery": "touchstart", // "touchmove .gallery": "touchmove", // "touchend .gallery": "touchend", @@ -51,10 +51,6 @@ var GalleryView = View.extend({ }) }, - prev: function(){ - }, - next: function(){ - }, touchstart: function(e){ }, touchmove: function(e){ diff --git a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js index 92a0e0f7..4789850a 100644 --- a/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js +++ b/StoneIsland/platforms/ios/www/js/lib/products/ProductView.js @@ -47,10 +47,10 @@ var ProductView = ScrollableView.extend({ cache: {}, gallery_prev: function(){ - this.gallery.gallery.flickity('prev') + app.product.gallery.gallery.previous() }, gallery_right: function(){ - this.gallery.gallery.flickity('next') + app.product.gallery.gallery.next() }, find: function(code, cb){ @@ -240,14 +240,18 @@ var ProductView = ScrollableView.extend({ app.last_view = app.cart } else if ( ! auth.has_cart() ) { + app.curtain.show("loading") auth.create_cart(function(){ auth.add_deferred_product_to_cart(function(){ + app.curtain.hide("loading") app.router.go("cart") }) }) } else { + app.curtain.show("loading") auth.add_deferred_product_to_cart(function(){ + app.curtain.hide("loading") if (opt.route) { app.router.go("cart") } @@ -263,6 +267,7 @@ var ProductView = ScrollableView.extend({ }, share: function(){ + window.plugins.socialsharing.share( this.item['ModelNames'], null, null, "http://stoneisland.com/") }, }) diff --git a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js index b1e095d3..f9abd011 100644 --- a/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js +++ b/StoneIsland/platforms/ios/www/js/lib/view/Serializable.js @@ -68,9 +68,11 @@ var SerializableView = View.extend({ var data = data || this.serialize() var errors = errors || [] var presence_msgs = this.validate_presence || {} - Object.keys(presence_msgs).forEach(function(k){ - if (! data[k]) errors.push( [ k, presence_msgs[k] ] ) - }) + if (! this.disabled) { + Object.keys(presence_msgs).forEach(function(k){ + if (! data[k]) errors.push( [ k, presence_msgs[k] ] ) + }) + } this.validate_fields && this.validate_fields(data, errors) this.cc && this.cc.validate(data, errors) this.address && this.address.validate(data, errors) @@ -78,6 +80,7 @@ var SerializableView = View.extend({ }, show_errors: function(errors){ + console.log(errors) var msgs = [] errors.forEach(function(e, i){ if (i > 0) { return } -- cgit v1.2.3-70-g09d2