diff options
Diffstat (limited to 'StoneIsland/platforms/ios')
68 files changed, 1692 insertions, 105 deletions
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 index 6408f0cb..ca81e886 100644 --- 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 @@ -7,12 +7,12 @@ <key>Cordova.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>26</integer> + <integer>27</integer> </dict> <key>CordovaLib.xcscheme_^#shared#^_</key> <dict> <key>orderHint</key> - <integer>27</integer> + <integer>26</integer> </dict> </dict> </dict> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist b/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist index 05e2bf1d..243e82c6 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Info.plist @@ -9,9 +9,9 @@ <key>CFBundleIdentifier</key> <string>us.okfoc.stoneisland</string> <key>CFBundleShortVersionString</key> - <string>1.3.6</string> + <string>1.4.1</string> <key>CFBundleVersion</key> - <string>1.3.6</string> + <string>1.4.1</string> <key>SigningIdentity</key> <string>iPhone Developer: Francesca Agusani (3ECUPBTQ5W)</string> <key>Team</key> @@ -20,7 +20,7 @@ <key>ArchiveVersion</key> <integer>2</integer> <key>CreationDate</key> - <date>2020-08-31T20:59:47Z</date> + <date>2020-09-10T01:08:49Z</date> <key>Name</key> <string>Stone Island</string> <key>SchemeName</key> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car Binary files differindex 5d013554..2ad653bc 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Assets.car diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib Binary files differindex cc285813..c7d58034 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib Binary files differindex f780245b..f0316145 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib Binary files differindex 8a068c1b..5bd69125 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib Binary files differindex 0ff0392f..6248565f 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/AppAuth.framework/AppAuth b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/AppAuth.framework/AppAuth Binary files differindex 19259c5c..8e3b9bb4 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/AppAuth.framework/AppAuth +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/AppAuth.framework/AppAuth diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/FBLPromises.framework/FBLPromises b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/FBLPromises.framework/FBLPromises Binary files differindex fc5f2e32..10325a3f 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/FBLPromises.framework/FBLPromises +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/FBLPromises.framework/FBLPromises diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMAppAuth.framework/GTMAppAuth b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMAppAuth.framework/GTMAppAuth Binary files differindex 856d0a20..fbaa31bc 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMAppAuth.framework/GTMAppAuth +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMAppAuth.framework/GTMAppAuth diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher Binary files differindex 35a801a4..d4dc2769 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac Binary files differindex 7de9b6eb..c1a0b599 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleUtilities.framework/GoogleUtilities b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleUtilities.framework/GoogleUtilities Binary files differindex 3ca0693a..00446650 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleUtilities.framework/GoogleUtilities +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/GoogleUtilities.framework/GoogleUtilities diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/Protobuf.framework/Protobuf b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/Protobuf.framework/Protobuf Binary files differindex 2352fe86..ea196c4f 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/Protobuf.framework/Protobuf +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/Protobuf.framework/Protobuf diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/nanopb.framework/nanopb b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/nanopb.framework/nanopb Binary files differindex a4b9d89e..1d0dc8f0 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/nanopb.framework/nanopb +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Frameworks/nanopb.framework/nanopb diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Info.plist b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Info.plist Binary files differindex 978174e0..a5cda5e8 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Info.plist +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Info.plist diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib Binary files differindex dfe88e56..cda3c8bf 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/MainViewController.nib diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island Binary files differindex 108cee1c..736f4b48 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/Stone Island diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources index ce59a57a..bc984757 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/_CodeSignature/CodeResources @@ -14,15 +14,15 @@ </data> <key>Assets.car</key> <data> - uYqukFCY7ilZ0q0vs41Cae2Q/z4= + J96uzPt+y/yK0fYJQSKTAx4cnVM= </data> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib</key> <data> - Ee7/03Tw8DbhRrvZ6P9eS6SmMVs= + P+Mx7FSSEsDVMJ75W+8fKuYGsb0= </data> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib</key> <data> - Kw+ZH/Mdt2qyo+eviymK6eDcH10= + 7AvmtbqVI1Bwqk764GSoqwXGqew= </data> <key>CDVLaunchScreen.storyboardc/Info.plist</key> <data> @@ -30,11 +30,11 @@ </data> <key>CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib</key> <data> - VIwnExQ83bk+YDlO2PP7iAf0tdQ= + UFl9OflgY8+MN+NlkySKkUuiIwQ= </data> <key>CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib</key> <data> - Q9w8wVwPEqUYKpsNM3f8ctqy3Cc= + iAm9xdxMNi+3+MUDZGpMwdxj58U= </data> <key>CDVNotification.bundle/beep.wav</key> <data> @@ -42,7 +42,7 @@ </data> <key>Frameworks/AppAuth.framework/AppAuth</key> <data> - nkgAwhfMrTdOGhY9LVufah5x6Eg= + M41ffogsRBvWN70YjCUNPLMRWyc= </data> <key>Frameworks/AppAuth.framework/Info.plist</key> <data> @@ -54,7 +54,7 @@ </data> <key>Frameworks/FBLPromises.framework/FBLPromises</key> <data> - Oxo2l9jmZXniYjnv7c9CF13t8bM= + OGDiHCZHSyzH9IQycsGZVNRqGxQ= </data> <key>Frameworks/FBLPromises.framework/Info.plist</key> <data> @@ -66,7 +66,7 @@ </data> <key>Frameworks/GTMAppAuth.framework/GTMAppAuth</key> <data> - 6Bq4fvCgmvmxLh3iXqxgM8G+zrw= + M2jV6nomP22uYyKxI6epivGZMYA= </data> <key>Frameworks/GTMAppAuth.framework/Info.plist</key> <data> @@ -78,7 +78,7 @@ </data> <key>Frameworks/GTMSessionFetcher.framework/GTMSessionFetcher</key> <data> - 1dQY4lAydkmmDm+ehjSgt339Mp8= + oVYUzx6znUCDdjo7ZNxLfZ7CjTU= </data> <key>Frameworks/GTMSessionFetcher.framework/Info.plist</key> <data> @@ -90,7 +90,7 @@ </data> <key>Frameworks/GoogleToolboxForMac.framework/GoogleToolboxForMac</key> <data> - CrvUxpzS6DGlfQn9fsRaASxIu7o= + h110yBYmy16iMdoTcqSJG6JySNE= </data> <key>Frameworks/GoogleToolboxForMac.framework/Info.plist</key> <data> @@ -102,7 +102,7 @@ </data> <key>Frameworks/GoogleUtilities.framework/GoogleUtilities</key> <data> - nPfDXTsgKSDmg1EjNuZBzyC7E5o= + iZY9QjYjTe+Le61Jff0jHr8i+FE= </data> <key>Frameworks/GoogleUtilities.framework/Info.plist</key> <data> @@ -118,7 +118,7 @@ </data> <key>Frameworks/Protobuf.framework/Protobuf</key> <data> - JNTxOnmOrxnETww5vWxDHuDSjGM= + sz6hM9ZSyaKkRpWnH5DpiqPNOLE= </data> <key>Frameworks/Protobuf.framework/_CodeSignature/CodeResources</key> <data> @@ -134,7 +134,7 @@ </data> <key>Frameworks/nanopb.framework/nanopb</key> <data> - 6tD+jeykf2bERXVwqb5KJrlzF8g= + 9JgxFwUNMrs6YY/EMyy3XIdyO40= </data> <key>GoogleService-Info.plist</key> <data> @@ -504,11 +504,11 @@ </dict> <key>Info.plist</key> <data> - WjM6aecphN8Ssbuvlzv+txuKos4= + MeCkwMTPCHE9KsoPU+Kv7sJfsPk= </data> <key>MainViewController.nib</key> <data> - 6Y8qD0iXcRaeNoguS1+E/4hccrU= + UYCtmR18wHSzD3U+CGPOElo3I2w= </data> <key>PkgInfo</key> <data> @@ -516,7 +516,7 @@ </data> <key>config.xml</key> <data> - ELKfowqhnmEr14JFfDb8E519yOU= + uveiRaHhpH5d+RYQWHCPSYBKkK4= </data> <key>embedded.mobileprovision</key> <data> @@ -560,7 +560,7 @@ </data> <key>www/cordova_plugins.js</key> <data> - N761KMOZ+2w7gM1M1znD21uR5Jg= + CVI8EL6VXN4K0JXwDfy6VD7t1WE= </data> <key>www/css/account.css</key> <data> @@ -568,7 +568,7 @@ </data> <key>www/css/blogs.css</key> <data> - qzsHGnVfspjF+ycTwycgCesQf80= + xRikSPgokmtXJl043evKKsv/Zms= </data> <key>www/css/cart.css</key> <data> @@ -628,11 +628,11 @@ </data> <key>www/css/index.css</key> <data> - 45Lx1pUI5yADc7ABlk+wcRSsQBY= + Dos+mo4fIcYWT4iB+kqvSOn3koc= </data> <key>www/css/nav.css</key> <data> - KalNpH/O+MD5y3/eTC2cOnPO8Ko= + DNS5u984Kk4DN7AZGwYXLYnQF4s= </data> <key>www/css/products.css</key> <data> @@ -644,7 +644,7 @@ </data> <key>www/css/vendor/imageviewer.css</key> <data> - giAUAMwC7nmBxqqJX8eTEROTwMc= + hJeuwLQu8PNynzOhmmzrZcaC55g= </data> <key>www/db.json</key> <data> @@ -756,7 +756,7 @@ </data> <key>www/index.html</key> <data> - 9dxWhpDHogRJjOfAkwqP5ZfYUjE= + BuNsAVVrjxRQA2sflCI12+l9D+g= </data> <key>www/js/index.js</key> <data> @@ -856,7 +856,7 @@ </data> <key>www/js/lib/etc/accessibility.js</key> <data> - LegUG4+94dBf3mRwgdCq9KnehKw= + kYyHAVfiU7npL5N4jzIS3hl3/EQ= </data> <key>www/js/lib/etc/analytics.js</key> <data> @@ -876,11 +876,11 @@ </data> <key>www/js/lib/etc/push.js</key> <data> - V8Ncwadzuj2DUkgtc6aKsAjmLrk= + l05J3At2kZPHlRJ4ycU6QZc574E= </data> <key>www/js/lib/etc/scroll.js</key> <data> - zg3GX8IMiMR4r0Dl4hNpRF6H1D0= + IYoJrqVIY5rMlEyJAjKXJoIt9RI= </data> <key>www/js/lib/etc/sim.js</key> <data> @@ -1098,6 +1098,14 @@ <data> ClFcxSc++1+co21X98ODwFS+dYA= </data> + <key>www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js</key> + <data> + DsEdr3n5lq3stq5qtEfEYzE8LWA= + </data> + <key>www/plugins/es6-promise-plugin/www/promise.js</key> + <data> + SaYUot7eUOO74AAVeBga+HSnf/E= + </data> </dict> <key>files2</key> <dict> @@ -1119,21 +1127,21 @@ <dict> <key>hash2</key> <data> - vcPfOAmCZRLrgJxCrIwjMTFkjTr01yBTCbRkgjyL0rw= + DUoYWq4P2cB2NYHW6TTRBgnLQtbd6kTLuQKTWb++wIE= </data> </dict> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib</key> <dict> <key>hash2</key> <data> - aebwyrO2IZeRGKHJQ0UzvXmA4vgtHpAawEukgIX6Uyk= + AhqQlcbAAqhqWK4oyS3EIq5NodUSDtjOQErVtgOTrjw= </data> </dict> <key>CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib</key> <dict> <key>hash2</key> <data> - G6uc+ccHQwspl438MZhGekF/X+B24tHU0R3tqPfpOjM= + 3gXXGtbA0ZiXyQVihbIYDhYiAlshZdn7ZQjPbOqvA1Y= </data> </dict> <key>CDVLaunchScreen.storyboardc/Info.plist</key> @@ -1147,14 +1155,14 @@ <dict> <key>hash2</key> <data> - ebx2qICBtoUFiT0fR8rqN3/khA9Z72kXivkVhufqp/0= + bsXrbE1tKkFZzkqzmfZEMr0332lyFFjS6tHLmOzbogQ= </data> </dict> <key>CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib</key> <dict> <key>hash2</key> <data> - JTgL1TiGh+l4NGGT9xPreyHhi+9pL5s1bO/7WMxRWfE= + DDkvWSn1llcycReL3l2iv9xRIYszOEFFeVPv+2m3ZWE= </data> </dict> <key>CDVNotification.bundle/beep.wav</key> @@ -1168,7 +1176,7 @@ <dict> <key>hash2</key> <data> - azR5yXGDSU1Vx68xN+JBem3ULpGeCetlqgBMOc2QhMU= + ZxyTMhQ7mcZMhGrKB7A42qCuiyt7tNxcwdztTG/Gh74= </data> </dict> <key>Frameworks/AppAuth.framework/Info.plist</key> @@ -1189,7 +1197,7 @@ <dict> <key>hash2</key> <data> - yaeS17VrXHDeW2vP1vCykcPkLyEqufEVbEnK8JiUTZM= + skNP5Xy/4+SOa2MCEOh0CpKGble3BBGriVtXdDIkCzM= </data> </dict> <key>Frameworks/FBLPromises.framework/Info.plist</key> @@ -1210,7 +1218,7 @@ <dict> <key>hash2</key> <data> - CrfP9syU9jpXRMpu+W9B2KxWJ7aix/uuFGA/ad5CxiA= + kM/q/qB/PxvIYInW/oBFBO7UfGDIIuYHZmCQfDEN4wA= </data> </dict> <key>Frameworks/GTMAppAuth.framework/Info.plist</key> @@ -1231,7 +1239,7 @@ <dict> <key>hash2</key> <data> - Qys2ERNJFB1AGjuh9wZbOIUl8ttAW+UOFIH7AnMfjs0= + QA/8jMSaXT3SrPwwZfbBsCZ3j8TsJ+wq5izSWwrEa8Q= </data> </dict> <key>Frameworks/GTMSessionFetcher.framework/Info.plist</key> @@ -1252,7 +1260,7 @@ <dict> <key>hash2</key> <data> - 8H7J9PidivAVqPW9OxNsT0gebgfjG1GED8MfoztT8Dk= + tmQ9x7EmT6JntueVPfHBeSr/HC/REII3TEzQD7n/Zwc= </data> </dict> <key>Frameworks/GoogleToolboxForMac.framework/Info.plist</key> @@ -1273,7 +1281,7 @@ <dict> <key>hash2</key> <data> - 2I0Hip5qiKloLMWoNYpt3r27bMQMpdzwEiyz4BAzChY= + hwCG9DTxJ+aFO10vvuyr6YVtgbYBDWj2qPwEmryZyhE= </data> </dict> <key>Frameworks/GoogleUtilities.framework/Info.plist</key> @@ -1301,7 +1309,7 @@ <dict> <key>hash2</key> <data> - BCWtwZzclYZ08Wh3ELfyl0ZAcrIjvyRl/l5VlNdvljw= + +oyaw8BZeiMJBjaXjhsrlqUL8N+dcifopgRC6diKJ7o= </data> </dict> <key>Frameworks/Protobuf.framework/_CodeSignature/CodeResources</key> @@ -1329,7 +1337,7 @@ <dict> <key>hash2</key> <data> - tPZWJkpNwbgrdwWFyDUa4VjBl5l5Qe+yjBxSrh+2H2k= + G0BniDyr67eKGhnutBXCCzsxASjybd8lI4ygdb9dvpc= </data> </dict> <key>GoogleService-Info.plist</key> @@ -1720,14 +1728,14 @@ <dict> <key>hash2</key> <data> - vo4sjbMRKcrnlvSEfRD9T5fJdMCtUdPzBsZHkW+1g1k= + G3r8GGO0W37/ZdOLiblPJFkGHl/hlqTf7PHCrsUSyR0= </data> </dict> <key>config.xml</key> <dict> <key>hash2</key> <data> - 5VS8xB7AGT/56zgsUFZ41aYvm7Rik/cA2uac+cpuhJU= + CR5hiSgUqnk2EWFDxpTK88OloRrhPGjYg/jiivF8eUY= </data> </dict> <key>embedded.mobileprovision</key> @@ -1804,7 +1812,7 @@ <dict> <key>hash2</key> <data> - PeQ1KHJyWjpqXMZb56bUvsZZ7kDDZQI/ZFmj2/fxTcQ= + CWFUOanZrPetE9exM2UID4FEP2g68xeB4JDYhwW69Fo= </data> </dict> <key>www/css/account.css</key> @@ -1818,7 +1826,7 @@ <dict> <key>hash2</key> <data> - 0Ref2ia2WNU/FUTXvy1d3r2wHLzp/RKcYkUFuKwjlHg= + MYEvUXIzZd0akqPWT2Hno4xJMQ11/uptDd5P15845oU= </data> </dict> <key>www/css/cart.css</key> @@ -1923,14 +1931,14 @@ <dict> <key>hash2</key> <data> - OVS3UOlBP0+h6LKr6ZFwMUtlcmMOBaE7H4RcT+LmHKk= + aBtGueYCAbgfTOS5JOJ2RaGOsusDO20DPQGphafGPR8= </data> </dict> <key>www/css/nav.css</key> <dict> <key>hash2</key> <data> - Sg5eAqeoaKilCtwQ7IDgmNzSGmMVYFQmEGtnIKWVbTg= + 5a9TTv1R+eYHOpiQSwDNdNU0hL0KgCRghrGe9gNQbVM= </data> </dict> <key>www/css/products.css</key> @@ -1951,7 +1959,7 @@ <dict> <key>hash2</key> <data> - hIOJjnxw91uNxU15wXKhBNQawenrYV0PSgxsJCC1Bg8= + vwjN0NgmiEmmz1u6g8PqHf6vKZR0VO2Yr1YS53EUVqA= </data> </dict> <key>www/db.json</key> @@ -2147,7 +2155,7 @@ <dict> <key>hash2</key> <data> - bv7QLGWRa55rBNra2XhPVv2sPGNoy+MQraZWiSlabJ4= + /1LXGeOiPDqdM90hGFPQJSlEA0V9VPgOk6NJ6/47lEA= </data> </dict> <key>www/js/index.js</key> @@ -2322,7 +2330,7 @@ <dict> <key>hash2</key> <data> - 4PhA4mT0S9DvCw16wPp9pwd4s9Gtz3uXcwrrcRjoToA= + 1BTAIoUw0q9kXVi8ZYVDP4lmYCJ/JMvMBtxjzgSAdZU= </data> </dict> <key>www/js/lib/etc/analytics.js</key> @@ -2357,14 +2365,14 @@ <dict> <key>hash2</key> <data> - Q5IKf7w6366oNr4Kuz0YyG1Yxra12yTSJ38fOGSbUkY= + kE1e8m3ng4KeRfamZwBcecoJTRpYn7woeEG3SGMx9tM= </data> </dict> <key>www/js/lib/etc/scroll.js</key> <dict> <key>hash2</key> <data> - uLSqkL7BiFk0rSN7Ow4z54qqRJfCX1P2hQZHthVK1q0= + XNLf2WIzlza5von9bMEmYE9Cfwt/uQdK/xDfFWnsr+c= </data> </dict> <key>www/js/lib/etc/sim.js</key> @@ -2745,6 +2753,20 @@ bxLaY2hOh13X+tMPiaLF4+Nj/dZcWSzVsaDz6Bj7CAc= </data> </dict> + <key>www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js</key> + <dict> + <key>hash2</key> + <data> + 17K+wpBts4g8z0mELlFpgMp0cfBIrQoSQI7ik5yIDyY= + </data> + </dict> + <key>www/plugins/es6-promise-plugin/www/promise.js</key> + <dict> + <key>hash2</key> + <data> + 9CIW7f5Dk7yEK84D9evgQc6ryThptFDJtCnHYeOvWAo= + </data> + </dict> </dict> <key>rules</key> <dict> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml index b59ed354..8d6da5a9 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget id="us.okfoc.stoneisland" version="1.3.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget id="us.okfoc.stoneisland" version="1.4.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <feature name="CDVWebViewEngine"> <param name="ios-package" value="CDVWebViewEngine" /> </feature> @@ -44,6 +44,10 @@ <feature name="Geolocation"> <param name="ios-package" value="CDVLocation" /> </feature> + <feature name="SocialSharing"> + <param name="ios-package" value="SocialSharing" /> + <param name="onload" value="true" /> + </feature> <name>Stone Island</name> <description> Stone Island @@ -79,6 +83,53 @@ <icon height="50" src="res/icon/ios/icon-50.png" width="50" /> <icon height="100" src="res/icon/ios/icon-50@2x.png" width="100" /> <icon height="167" src="res/icon/ios/icon-83.5@2x.png" width="167" /> + <icon height="57" src="resources/ios/icon/icon.png" width="57" /> + <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /> + <icon height="20" src="resources/ios/icon/icon-20.png" width="20" /> + <icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" /> + <icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" /> + <icon height="29" src="resources/ios/icon/icon-29.png" width="29" /> + <icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" /> + <icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" /> + <icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" /> + <icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" /> + <icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" /> + <icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" /> + <icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" /> + <icon height="216" src="resources/ios/icon/icon-108@2x.png" width="216" /> + <icon height="40" src="resources/ios/icon/icon-40.png" width="40" /> + <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /> + <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /> + <icon height="50" src="resources/ios/icon/icon-50.png" width="50" /> + <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /> + <icon height="60" src="resources/ios/icon/icon-60.png" width="60" /> + <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /> + <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /> + <icon height="72" src="resources/ios/icon/icon-72.png" width="72" /> + <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /> + <icon height="76" src="resources/ios/icon/icon-76.png" width="76" /> + <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /> + <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /> + <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /> + <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /> + <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /> + <splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" /> + <splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" /> + <splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" /> + <splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" /> + <splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" /> + <splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" /> + <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /> + <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /> + <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /> + <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /> + <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /> + <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /> + <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /> + <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /> + <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /> + <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> + <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /> <hook src="scripts/plist-hook.js" type="after_prepare" /> <preference name="AllowInlineMediaPlayback" value="true" /> <preference name="BackupWebStorage" value="local" /> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js index 74e8a3a4..a5fc9f49 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/cordova_plugins.js @@ -79,6 +79,20 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "clobbers": [ "navigator.geolocation" ] + }, + { + "id": "es6-promise-plugin.Promise", + "file": "plugins/es6-promise-plugin/www/promise.js", + "pluginId": "es6-promise-plugin", + "runs": true + }, + { + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] } ]; module.exports.metadata = { @@ -92,6 +106,8 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "cordova-plugin-firebasex": "10.2.0-cli", "cordova-plugin-ionic-keyboard": "2.2.0", "cordova-plugin-sim": "1.3.3", - "cordova-plugin-geolocation": "4.0.2" + "cordova-plugin-geolocation": "4.0.2", + "es6-promise-plugin": "4.2.2", + "cordova-plugin-x-socialsharing": "5.1.8" }; });
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/blogs.css b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/blogs.css index ee54a31f..f56ec474 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/blogs.css +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/blogs.css @@ -36,7 +36,8 @@ text-decoration: underline; } #story .content > div { - display:none; + display: none; + padding-bottom: env(safe-area-inset-bottom); } #story .content div.active { display:block; @@ -340,7 +341,7 @@ ul.links { #archive .scroll { top: 0; left: 0; - height: calc(100% - 125px); + height: 100%; } #archive .row:first-of-type { margin-top: 7em; diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/index.css b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/index.css index 2130c675..496a0ee4 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/index.css +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/index.css @@ -2,8 +2,8 @@ -webkit-tap-highlight-color: rgba(0,0,0,0); } body, html { - height: 100%; - width: 100%; + height: 100vh; + width: 100vw; margin: 0px; padding: 0px; overflow: hidden; @@ -18,7 +18,6 @@ body { background: #fff; font-family: pfd, sans-serif; font-size: 0.875rem; - padding-top: constant(safe-area-inset-top); } a, a:visited { color: #000; @@ -60,6 +59,7 @@ a, a:visited { } .vscroll .scroll { width: 100%; + overflow-x: hidden; /* height: calc(100vh - 2.5rem); overflow: scroll; -webkit-overflow-scrolling: touch; diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css index 8ae57921..bd6747b1 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/nav.css @@ -3,7 +3,9 @@ #nav { position: fixed; - top: 0; left: 0; + top: env(safe-area-inset-top); + left: 0; + height: calc(100vh - env(safe-area-inset-top)); width: 249px; -webkit-transform: translateZ(0) translateX(-249px); -webkit-transition: -webkit-transform 0.1s; @@ -11,8 +13,10 @@ } #content { position: fixed; - top: 0; left: 0; - width: 100%; height: 100%; + top: env(safe-area-inset-top); + left: 0; + width: 100%; + height: calc(100vh - env(safe-area-inset-top)); overflow: hidden; -webkit-transform: translateZ(0) translateX(0px); -webkit-transition: -webkit-transform 0.1s; @@ -88,7 +92,7 @@ position: absolute; width: 100%; padding: 20px 0; - top:0; + top: 0; border-top: 1px solid #ddd; } @@ -102,9 +106,10 @@ #nav .social { position: absolute; - top: calc(100vh - 48px); + bottom: env(safe-area-inset-bottom); left: 0; border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; display: flex; flex-direction: row; } @@ -162,7 +167,7 @@ #nav-container { display:flex; - height:calc(100vh - 40px); + height: 100%; width:100%; position:absolute; flex-direction: column; @@ -343,9 +348,13 @@ padding-bottom:0px; #footer { display: block; position: fixed; - bottom: 0; left: 0; width: 100%; + bottom: 0; + left: 0; + width: 100%; background: #fff; border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin-bottom: env(safe-area-inset-bottom); z-index: 1; } #footer div { diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/vendor/imageviewer.css b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/vendor/imageviewer.css index 739c37a1..90d80fde 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/vendor/imageviewer.css +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/css/vendor/imageviewer.css @@ -26,7 +26,7 @@ height: 48px; position: fixed; right: 20px; - top: 20px; + top: calc(20px + env(safe-area-inset-top)); cursor: pointer; text-align: center; overflow: hidden; diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/index.html b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/index.html index d8065176..46c79c98 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/index.html +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/index.html @@ -15,7 +15,7 @@ <meta http-equiv="Content-Security-Policy" content="default-src * gap: 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com https://www.google-analytics.com; script-src * 'unsafe-inline' 'unsafe-eval'; object-src * 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com https://www.google-analytics.com; style-src * 'unsafe-inline' 'unsafe-eval'; img-src * 'unsafe-inline' 'unsafe-eval'; media-src * 'unsafe-inline' 'unsafe-eval'; frame-src * gap: 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com https://www.google-analytics.com; font-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline' 'unsafe-eval'"> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> - <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"> + <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width, height=device-height, viewport-fit=cover"> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="css/fonts/fonts.css"> <link rel="stylesheet" type="text/css" href="css/fonts/ionicons.css"> @@ -122,7 +122,9 @@ <div id="story" role="region" aria-label="Stone Island Story"> <div class="scroll"> <h1 role="menuitem" aria-label="Current section: Stone Island Story">STORY</h1> - <img> + <div> + <img> + </div> <ul class="links"></ul> <div class="content"> <script type="text/html" class="template"> diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js index a18ad5b3..c91582f0 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/accessibility.js @@ -1,4 +1,5 @@ var accessibility = (function() { + $('html').addClass('vscroll') var accessibility = {} accessibility.voiceOver = false @@ -43,7 +44,7 @@ var accessibility = (function() { $("html").addClass('accessible') $('html').addClass('vscroll') } else { - $('html').addClass('iscroll') + // $('html').addClass('iscroll') } ready() }) diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/push.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/push.js index 1f0ab9b6..6158f04b 100755 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/push.js @@ -163,6 +163,6 @@ var push = (function(){ } push.error = function(e){ console.log("push error") - } + } return push })()
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/scroll.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/scroll.js index 253921e1..51e14a01 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/scroll.js +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/js/lib/etc/scroll.js @@ -22,8 +22,9 @@ function NativeScroll(el) { } function ScrollFactory (el, opt) { - if (accessibility.voiceOver) { - return NativeScroll(el) - } - return new IScroll(el, opt) + return NativeScroll(el) + // if (accessibility.voiceOver) { + // return NativeScroll(el) + // } + // return new IScroll(el, opt) } diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js new file mode 100644 index 00000000..9329adb6 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js @@ -0,0 +1,143 @@ +cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { +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", []); +}; + +// this is the recommended way to share as it is the most feature-rich with respect to what you pass in and get back +SocialSharing.prototype.shareWithOptions = function (options, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareWithOptions"), "SocialSharing", "shareWithOptions", [options]); +}; + +SocialSharing.prototype.shareW3C = function (sharedata) { + return new Promise(function(resolve, reject) { + var options = { + subject: sharedata.title, + message: sharedata.text, + url: sharedata.url + }; + if(sharedata.hasOwnProperty('title') || + sharedata.hasOwnProperty('text') || + sharedata.hasOwnProperty('url')) { + cordova.exec(resolve, reject, "SocialSharing", "shareWithOptions", [options]); + } else { + reject(); + } + }); +}; + +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, null]); +}; + +SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToReceiver"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, receiver]); +}; + +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(); + navigator.share = window.plugins.socialsharing.shareW3C; + return window.plugins.socialsharing; +}; + +cordova.addConstructor(SocialSharing.install); + +}); diff --git a/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/es6-promise-plugin/www/promise.js b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/es6-promise-plugin/www/promise.js new file mode 100644 index 00000000..6cce47ae --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island.xcarchive/Products/Applications/Stone Island.app/www/plugins/es6-promise-plugin/www/promise.js @@ -0,0 +1,13 @@ +cordova.define("es6-promise-plugin.Promise", function(require, exports, module) { +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.2+97478eb6 + */ + +!function t(e,n,r){function o(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(t){var n=e[u][1][t];return o(n?n:t)},a,a.exports,t,e,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t){void 0===window.Promise&&t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,e,n){(function(r,o){!function(t,r){"object"==typeof n&&"undefined"!=typeof e?e.exports=r():"function"==typeof define&&define.amd?define(r):t.ES6Promise=r()}(this,function(){"use strict";function e(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function n(t){return"function"==typeof t}function i(t){J=t}function u(t){Q=t}function s(){return function(){return r.nextTick(h)}}function c(){return"undefined"!=typeof I?function(){I(h)}:l()}function f(){var t=0,e=new X(h),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function a(){var t=new MessageChannel;return t.port1.onmessage=h,function(){return t.port2.postMessage(0)}}function l(){var t=setTimeout;return function(){return t(h,1)}}function h(){for(var t=0;H>t;t+=2){var e=te[t],n=te[t+1];e(n),te[t]=void 0,te[t+1]=void 0}H=0}function p(){try{var e=t,n=e("vertx");return I=n.runOnLoop||n.runOnContext,c()}catch(r){return l()}}function d(t,e){var n=this,r=new this.constructor(y);void 0===r[ne]&&D(r);var o=n._state;if(o){var i=arguments[o-1];Q(function(){return L(o,r,i,n._result)})}else O(n,r,t,e);return r}function v(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(y);return E(n,t),n}function y(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ue.error=e,ue}}function g(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function b(t,e,n){Q(function(t){var r=!1,o=g(n,e,function(n){r||(r=!0,e!==n?E(t,n):j(t,n))},function(e){r||(r=!0,x(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,x(t,o))},t)}function T(t,e){e._state===oe?j(t,e._result):e._state===ie?x(t,e._result):O(e,void 0,function(e){return E(t,e)},function(e){return x(t,e)})}function A(t,e,r){e.constructor===t.constructor&&r===d&&e.constructor.resolve===v?T(t,e):r===ue?(x(t,ue.error),ue.error=null):void 0===r?j(t,e):n(r)?b(t,e,r):j(t,e)}function E(t,n){t===n?x(t,m()):e(n)?A(t,n,w(n)):j(t,n)}function S(t){t._onerror&&t._onerror(t._result),M(t)}function j(t,e){t._state===re&&(t._result=e,t._state=oe,0!==t._subscribers.length&&Q(M,t))}function x(t,e){t._state===re&&(t._state=ie,t._result=e,Q(S,t))}function O(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+oe]=n,o[i+ie]=r,0===i&&t._state&&Q(M,t)}function M(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,u=0;u<e.length;u+=3)r=e[u],o=e[u+n],r?L(n,r,o,i):o(i);t._subscribers.length=0}}function P(){this.error=null}function C(t,e){try{return t(e)}catch(n){return se.error=n,se}}function L(t,e,r,o){var i=n(r),u=void 0,s=void 0,c=void 0,f=void 0;if(i){if(u=C(r,o),u===se?(f=!0,s=u.error,u.error=null):c=!0,e===u)return x(e,_()),void 0}else u=o,c=!0;e._state!==re||(i&&c?E(e,u):f?x(e,s):t===oe?j(e,u):t===ie&&x(e,u))}function k(t,e){try{e(function(e){E(t,e)},function(e){x(t,e)})}catch(n){x(t,n)}}function q(){return ce++}function D(t){t[ne]=ce++,t._state=void 0,t._result=void 0,t._subscribers=[]}function F(){return new Error("Array Methods must be provided an Array")}function F(){return new Error("Array Methods must be provided an Array")}function N(t){return new fe(this,t).promise}function U(t){var e=this;return G(t)?new e(function(n,r){for(var o=t.length,i=0;o>i;i++)e.resolve(t[i]).then(n,r)}):new e(function(t,e){return e(new TypeError("You must pass an array to race."))})}function Y(t){var e=this,n=new e(y);return x(n,t),n}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(){var t=void 0;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=ae}var B=void 0;B=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G=B,H=0,I=void 0,J=void 0,Q=function(t,e){te[H]=t,te[H+1]=e,H+=2,2===H&&(J?J(h):ee())},R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof r&&"[object process]"==={}.toString.call(r),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3),ee=void 0;ee=Z?s():X?f():$?a():void 0===R&&"function"==typeof t?p():l();var ne=Math.random().toString(36).substring(16),re=void 0,oe=1,ie=2,ue=new P,se=new P,ce=0,fe=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(y),this.promise[ne]||D(this.promise),G(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&j(this.promise,this._result))):x(this.promise,F())}return t.prototype._enumerate=function(t){for(var e=0;this._state===re&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===v){var o=w(t);if(o===d&&t._state!==re)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===ae){var i=new n(y);A(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===re&&(this._remaining--,t===ie?x(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,function(t){return n._settledAt(oe,e,t)},function(t){return n._settledAt(ie,e,t)})},t}(),ae=function(){function t(e){this[ne]=q(),this._result=this._state=void 0,this._subscribers=[],y!==e&&("function"!=typeof e&&K(),this instanceof t?k(this,e):W())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return ae.prototype.then=d,ae.all=N,ae.race=U,ae.resolve=v,ae.reject=Y,ae._setScheduler=i,ae._setAsap=u,ae._asap=Q,ae.polyfill=z,ae.Promise=ae,ae})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],3:[function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(a===setTimeout)return setTimeout(t,0);if((a===n||!a)&&setTimeout)return a=setTimeout,setTimeout(t,0);try{return a(t,0)}catch(e){try{return a.call(null,t,0)}catch(e){return a.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function u(){v&&p&&(v=!1,p.length?d=p.concat(d):y=-1,d.length&&s())}function s(){if(!v){var t=o(u);v=!0;for(var e=d.length;e;){for(p=d,d=[];++y<e;)p&&p[y].run();y=-1,e=d.length}p=null,v=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function f(){}var a,l,h=e.exports={};!function(){try{a="function"==typeof setTimeout?setTimeout:n}catch(t){a=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(t){l=r}}();var p,d=[],v=!1,y=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=f,h.addListener=f,h.once=f,h.off=f,h.removeListener=f,h.removeAllListeners=f,h.emit=f,h.prependListener=f,h.prependOnceListener=f,h.listeners=function(){return[]},h.binding=function(){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}]},{},[1]); + + +}); diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj index f1750136..12bc5219 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj +++ b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.pbxproj @@ -30,6 +30,10 @@ FE7E6FBF64B743E1B0DEF2C1 /* CDVNotification.m in Sources */ = {isa = PBXBuildFile; fileRef = 64926A7A7755476ABE3FF7D8 /* CDVNotification.m */; }; B1DD3BF6694744C488A56045 /* CDVLocation.m in Sources */ = {isa = PBXBuildFile; fileRef = B1DAB4A2F7C3441BBEE1E458 /* CDVLocation.m */; }; A39A7D720A1E4BAE929460AA /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCAAA7E018BA4943950D741E /* CoreLocation.framework */; }; + 66CF07063B0A4B868F0B975D /* NSString+SSURLEncoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 6632A11BE0364AEEA61C0720 /* NSString+SSURLEncoding.m */; }; + A6E1460D046D4192824FB30A /* SocialSharing.m in Sources */ = {isa = PBXBuildFile; fileRef = 76964A3F613E483AA6F8ED45 /* SocialSharing.m */; }; + E8D749A994FE4DDA8234BB89 /* Social.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 319E118315814DB6BF4C972F /* Social.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; + 797865A307CC4B24883360FB /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DCD230618D904E4989D78B61 /* MessageUI.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -104,6 +108,12 @@ B1DAB4A2F7C3441BBEE1E458 /* CDVLocation.m */ = {isa = PBXFileReference; name = "CDVLocation.m"; path = "cordova-plugin-geolocation/CDVLocation.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; 26A7E99B9DB94658A07B0D53 /* CDVLocation.h */ = {isa = PBXFileReference; name = "CDVLocation.h"; path = "cordova-plugin-geolocation/CDVLocation.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; CCAAA7E018BA4943950D741E /* CoreLocation.framework */ = {isa = PBXFileReference; name = "CoreLocation.framework"; path = "System/Library/Frameworks/CoreLocation.framework"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = wrapper.framework; explicitFileType = undefined; includeInIndex = 0; }; + 6632A11BE0364AEEA61C0720 /* NSString+SSURLEncoding.m */ = {isa = PBXFileReference; name = "NSString+SSURLEncoding.m"; path = "cordova-plugin-x-socialsharing/NSString+SSURLEncoding.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + 76964A3F613E483AA6F8ED45 /* SocialSharing.m */ = {isa = PBXFileReference; name = "SocialSharing.m"; path = "cordova-plugin-x-socialsharing/SocialSharing.m"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; explicitFileType = undefined; includeInIndex = 0; }; + C7979BF4906B414C932C3F1B /* NSString+SSURLEncoding.h */ = {isa = PBXFileReference; name = "NSString+SSURLEncoding.h"; path = "cordova-plugin-x-socialsharing/NSString+SSURLEncoding.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + F79D26C6811C45C8A2A09BB8 /* SocialSharing.h */ = {isa = PBXFileReference; name = "SocialSharing.h"; path = "cordova-plugin-x-socialsharing/SocialSharing.h"; sourceTree = "<group>"; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; explicitFileType = undefined; includeInIndex = 0; }; + 319E118315814DB6BF4C972F /* Social.framework */ = {isa = PBXFileReference; name = "Social.framework"; path = "System/Library/Frameworks/Social.framework"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = wrapper.framework; explicitFileType = undefined; includeInIndex = 0; }; + DCD230618D904E4989D78B61 /* MessageUI.framework */ = {isa = PBXFileReference; name = "MessageUI.framework"; path = "System/Library/Frameworks/MessageUI.framework"; sourceTree = SDKROOT; fileEncoding = undefined; lastKnownFileType = wrapper.framework; explicitFileType = undefined; includeInIndex = 0; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -117,6 +127,8 @@ A9D226BEA491E987403A196E /* Pods_Stone_Island.framework in Frameworks */, C83D0D401C7A436EA784DCF6 /* CoreTelephony.framework in Frameworks */, A39A7D720A1E4BAE929460AA /* CoreLocation.framework in Frameworks */, + E8D749A994FE4DDA8234BB89 /* Social.framework in Frameworks */, + 797865A307CC4B24883360FB /* MessageUI.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -195,6 +207,8 @@ 05A02CD447BD8D2A2D86D7FE /* Pods_Stone_Island.framework */, 974DC9851ACB4D3690651420 /* CoreTelephony.framework */, CCAAA7E018BA4943950D741E /* CoreLocation.framework */, + 319E118315814DB6BF4C972F /* Social.framework */, + DCD230618D904E4989D78B61 /* MessageUI.framework */, ); name = Frameworks; sourceTree = "<group>"; @@ -239,6 +253,10 @@ B4A9C9D258864C6092DB7F51 /* Sim.h */, B1DAB4A2F7C3441BBEE1E458 /* CDVLocation.m */, 26A7E99B9DB94658A07B0D53 /* CDVLocation.h */, + 6632A11BE0364AEEA61C0720 /* NSString+SSURLEncoding.m */, + 76964A3F613E483AA6F8ED45 /* SocialSharing.m */, + C7979BF4906B414C932C3F1B /* NSString+SSURLEncoding.h */, + F79D26C6811C45C8A2A09BB8 /* SocialSharing.h */, ); name = Plugins; path = "Stone Island/Plugins"; @@ -477,6 +495,8 @@ 404355F4F33F49F9A5C754DF /* CDVIonicKeyboard.m in Sources */, A081FB2906874B84BC6E27C7 /* Sim.m in Sources */, B1DD3BF6694744C488A56045 /* CDVLocation.m in Sources */, + 66CF07063B0A4B868F0B975D /* NSString+SSURLEncoding.m in Sources */, + A6E1460D046D4192824FB30A /* SocialSharing.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate Binary files differindex eed3aa93..2f7b9717 100644 --- a/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate +++ b/StoneIsland/platforms/ios/Stone Island.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-1024.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-1024.png Binary files differindex 1b9cbb91..f24a6189 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-1024.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-1024.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-20.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-20.png Binary files differindex 5788eed9..d44dfcee 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-20.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-20.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-24@2x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-24@2x.png Binary files differindex f0babf9d..7180ef81 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-24@2x.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-24@2x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-27.5@2x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-27.5@2x.png Binary files differindex 78f21bb3..ae738e76 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-27.5@2x.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-27.5@2x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-29@3x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-29@3x.png Binary files differindex c63fd776..0aa9feb8 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-29@3x.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-29@3x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-44@2x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-44@2x.png Binary files differindex 01c5af72..953db999 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-44@2x.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-44@2x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-60.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-60.png Binary files differnew file mode 100644 index 00000000..cd5951b4 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-60.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-86@2x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-86@2x.png Binary files differindex f32a034a..1255055c 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-86@2x.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-86@2x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-98@2x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-98@2x.png Binary files differindex 85ec9e36..fca09093 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-98@2x.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-98@2x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small.png Binary files differnew file mode 100644 index 00000000..22add8d3 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small@2x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small@2x.png Binary files differnew file mode 100644 index 00000000..c68f149a --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small@2x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small@3x.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small@3x.png Binary files differnew file mode 100644 index 00000000..bdc68eac --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/AppIcon.appiconset/icon-small@3x.png diff --git a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png Binary files differindex 357d8bf5..76766c49 100644 --- a/StoneIsland/platforms/ios/Stone Island/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png +++ b/StoneIsland/platforms/ios/Stone Island/Images.xcassets/LaunchStoryboard.imageset/Default@2x~universal~anyany.png diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/NSString+SSURLEncoding.h b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/NSString+SSURLEncoding.h new file mode 100644 index 00000000..71447b60 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/NSString+SSURLEncoding.h @@ -0,0 +1,5 @@ +#import <Foundation/Foundation.h> + +@interface NSString (SSURLEncoding) +@property (readonly) NSString *URLEncodedString; +@end diff --git a/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/NSString+SSURLEncoding.m b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/NSString+SSURLEncoding.m new file mode 100644 index 00000000..c8e746d3 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/NSString+SSURLEncoding.m @@ -0,0 +1,30 @@ +#import "NSString+SSURLEncoding.h" + +@implementation NSString (SSURLEncoding) +- (NSString*)URLEncodedString +{ + NSString* result = (NSString *)CFBridgingRelease( + CFURLCreateStringByAddingPercentEscapes( + kCFAllocatorDefault, + (CFStringRef)self, + CFSTR("#%"), // don't escape these + NULL, // allow escaping these + kCFStringEncodingUTF8 + ) + ); + + // we may have a URL with more than one '#' now - which iOS doesn't allow, so escape all but the first one + NSArray *parts = [result componentsSeparatedByString:@"#"]; + NSString *finalResult = parts[0]; + for (int i=1; i<parts.count; i++) { + NSString *part = [parts objectAtIndex:i]; + if (i==1) { + finalResult = [finalResult stringByAppendingString:@"#"]; + } else { + finalResult = [finalResult stringByAppendingString:@"%23"]; + } + finalResult = [finalResult stringByAppendingString:part]; + } + return finalResult; +} +@end
\ No newline at end of file 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 100644 index 00000000..0c731450 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.h @@ -0,0 +1,28 @@ +#import <Cordova/CDV.h> +#import <MessageUI/MFMailComposeViewController.h> + +@interface SocialSharing : CDVPlugin <UIPopoverControllerDelegate, MFMailComposeViewControllerDelegate, UIDocumentInteractionControllerDelegate> + +@property (nonatomic, strong) MFMailComposeViewController *globalMailComposer; +@property (nonatomic, strong) UIDocumentInteractionController * documentInteractionController; +@property (retain) NSString * tempStoredFile; +@property (retain) CDVInvokedUrlCommand * command; + +- (void)available:(CDVInvokedUrlCommand*)command; +- (void)setIPadPopupCoordinates:(CDVInvokedUrlCommand*)command; +- (void)share:(CDVInvokedUrlCommand*)command; +- (void)shareWithOptions:(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 100644 index 00000000..57336cd9 --- /dev/null +++ b/StoneIsland/platforms/ios/Stone Island/Plugins/cordova-plugin-x-socialsharing/SocialSharing.m @@ -0,0 +1,808 @@ +#import "SocialSharing.h" +#import "NSString+SSURLEncoding.h" +#import <Cordova/CDV.h> +#import <Social/Social.h> +#import <Foundation/NSException.h> +#import <MessageUI/MFMessageComposeViewController.h> +#import <MessageUI/MFMailComposeViewController.h> +#import <MobileCoreServices/MobileCoreServices.h> + +static NSString *const kShareOptionMessage = @"message"; +static NSString *const kShareOptionSubject = @"subject"; +static NSString *const kShareOptionFiles = @"files"; +static NSString *const kShareOptionUrl = @"url"; + +@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 shareInternal:command + withOptions:@{ + kShareOptionMessage: [command.arguments objectAtIndex:0], + kShareOptionSubject: [command.arguments objectAtIndex:1], + kShareOptionFiles: [command.arguments objectAtIndex:2], + kShareOptionUrl: [command.arguments objectAtIndex:3] + } + isBooleanResponse:YES +]; +} + +- (void)shareWithOptions:(CDVInvokedUrlCommand*)command { + NSDictionary* options = [command.arguments objectAtIndex:0]; + [self shareInternal:command + withOptions:options + isBooleanResponse:NO + ]; +} + +- (void)shareInternal:(CDVInvokedUrlCommand*)command withOptions:(NSDictionary*)options isBooleanResponse:(BOOL)boolResponse { + [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 = options[kShareOptionMessage]; + NSString *subject = options[kShareOptionSubject]; + NSArray *filenames = options[kShareOptionFiles]; + NSString *urlString = options[kShareOptionUrl]; + + NSMutableArray *activityItems = [[NSMutableArray alloc] init]; + + if (message != (id)[NSNull null] && message != nil) { + [activityItems addObject:message]; + } + + if (filenames != (id)[NSNull null] && filenames != nil && filenames.count > 0) { + NSMutableArray *files = [[NSMutableArray alloc] init]; + 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] && urlString != nil) { + [activityItems addObject:[NSURL URLWithString:[urlString URLEncodedString]]]; + } + + 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] && subject != nil) { + [activityVC setValue:subject forKey:@"subject"]; + } + + if ([activityVC respondsToSelector:(@selector(setCompletionWithItemsHandler:))]) { + [activityVC setCompletionWithItemsHandler:^(NSString *activityType, BOOL completed, NSArray * returnedItems, NSError * activityError) { + [self cleanupStoredFiles]; + if (boolResponse) { + [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:completed] + callbackId:command.callbackId]; + } else { + NSDictionary * result = @{@"completed":@(completed), @"app":activityType == nil ? @"" : activityType}; + [self.commandDelegate sendPluginResult:[CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:result] + callbackId:command.callbackId]; + } + }]; + } else { + // let's suppress this warning otherwise folks will start opening issues while it's not relevant +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + [activityVC setCompletionHandler:^(NSString *activityType, BOOL completed) { + [self cleanupStoredFiles]; + NSDictionary * result = @{@"completed":@(completed), @"app":activityType == nil ? @"" : activityType}; + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:result]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + }]; +#pragma GCC diagnostic warning "-Wdeprecated-declarations" + } + + 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 URLEncodedString]]]; + } + + [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 cycleTheGlobalMailComposer]; + + 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]; + + if (!data) { + CDVPluginResult * pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"invalid attachment"]; + [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; + return; + } + + NSString* fileName; + NSString* mimeType; + NSString* basename = [self getBasenameFromAttachmentPath:path]; + + //Find data anywhere in string + NSRange rangeData = [basename rangeOfString:@"data:"]; + if (rangeData.location == NSNotFound) + { + fileName = [basename pathComponents].lastObject; + mimeType = [self getMimeTypeFromFileExtension:[basename pathExtension]]; + } + else + { + mimeType = (NSString*)[[[basename substringFromIndex:rangeData.location+rangeData.length] componentsSeparatedByString: @";"] objectAtIndex:0]; + + //Find df anywhere in string + NSRange rangeDF = [basename rangeOfString:@"df:"]; + //If not found fallback to default name + if (rangeDF.location == NSNotFound) { + fileName = @"attachment."; + fileName = [fileName stringByAppendingString:(NSString*)[[mimeType componentsSeparatedByString: @"/"] lastObject]]; + } else { + //Found, apply name + fileName = (NSString*)[[[basename substringFromIndex:rangeDF.location+rangeDF.length] componentsSeparatedByString: @";"] objectAtIndex:0]; + } + + + NSString *base64content = (NSString*)[[basename componentsSeparatedByString: @","] lastObject]; + data = [SocialSharing dataFromBase64String:base64content]; + } + [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 componentsSeparatedByString: @"?"][0]; +} + +- (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:NO 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; + + // test for #513 + dispatch_async(dispatch_get_main_queue(), ^(void){ + [_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]; + NSString *abid = [command.arguments objectAtIndex:4]; + + // 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 URLEncodedString]]; + } + } + NSString * encodedShareString = [shareString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; + // also encode the '=' character + encodedShareString = [encodedShareString stringByReplacingOccurrencesOfString:@"=" withString:@"%3D"]; + encodedShareString = [encodedShareString stringByReplacingOccurrencesOfString:@"&" withString:@"%26"]; + NSString * abidString = @""; + if (abid != (id)[NSNull null]) { + abidString = [NSString stringWithFormat:@"abid=%@&", abid]; + } + NSString * encodedShareStringForWhatsApp = [NSString stringWithFormat:@"whatsapp://send?%@text=%@", abidString, 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]) { + NSRange rangeData = [fileName rangeOfString:@"data:"]; + if ([fileName hasPrefix:@"http"]) { + NSURL *url = [NSURL URLWithString:fileName]; + NSData *fileData = [NSData dataWithContentsOfURL:url]; + NSString *name = (NSString*)[[fileName componentsSeparatedByString: @"/"] lastObject]; + file = [NSURL fileURLWithPath:[self storeInFile:[name componentsSeparatedByString: @"?"][0] 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 (rangeData.location != NSNotFound ){ + //If found "data:" + NSString *fileType = (NSString*)[[[fileName substringFromIndex:rangeData.location+rangeData.length] componentsSeparatedByString: @";"] objectAtIndex:0]; + + NSString* attachmentName; + //Find df anywhere in string + NSRange rangeDF = [fileName rangeOfString:@"df:"]; + //If not found fallback to default name + if (rangeDF.location == NSNotFound) { + attachmentName = @"attachment."; + attachmentName = [attachmentName stringByAppendingString:(NSString*)[[fileType componentsSeparatedByString: @"/"] lastObject]]; + } else { + //Found, apply name + attachmentName = (NSString*)[[[fileName substringFromIndex:rangeDF.location+rangeDF.length] componentsSeparatedByString: @";"] objectAtIndex:0]; + } + + + NSString *base64content = (NSString*)[[fileName componentsSeparatedByString: @","] lastObject]; + NSData* data = [SocialSharing dataFromBase64String:base64content]; + file = [NSURL fileURLWithPath:[self storeInFile:attachmentName fileData:data]]; + + } 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/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist index 93f3b919..4e833075 100644 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -17,11 +17,11 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>1.3.6</string> + <string>1.4.1</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> - <string>1.3.6</string> + <string>1.4.1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>NSMainNibFile</key> diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index b59ed354..8d6da5a9 100644 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget id="us.okfoc.stoneisland" version="1.3.6" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget id="us.okfoc.stoneisland" version="1.4.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <feature name="CDVWebViewEngine"> <param name="ios-package" value="CDVWebViewEngine" /> </feature> @@ -44,6 +44,10 @@ <feature name="Geolocation"> <param name="ios-package" value="CDVLocation" /> </feature> + <feature name="SocialSharing"> + <param name="ios-package" value="SocialSharing" /> + <param name="onload" value="true" /> + </feature> <name>Stone Island</name> <description> Stone Island @@ -79,6 +83,53 @@ <icon height="50" src="res/icon/ios/icon-50.png" width="50" /> <icon height="100" src="res/icon/ios/icon-50@2x.png" width="100" /> <icon height="167" src="res/icon/ios/icon-83.5@2x.png" width="167" /> + <icon height="57" src="resources/ios/icon/icon.png" width="57" /> + <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /> + <icon height="20" src="resources/ios/icon/icon-20.png" width="20" /> + <icon height="40" src="resources/ios/icon/icon-20@2x.png" width="40" /> + <icon height="60" src="resources/ios/icon/icon-20@3x.png" width="60" /> + <icon height="29" src="resources/ios/icon/icon-29.png" width="29" /> + <icon height="58" src="resources/ios/icon/icon-29@2x.png" width="58" /> + <icon height="87" src="resources/ios/icon/icon-29@3x.png" width="87" /> + <icon height="48" src="resources/ios/icon/icon-24@2x.png" width="48" /> + <icon height="55" src="resources/ios/icon/icon-27.5@2x.png" width="55" /> + <icon height="88" src="resources/ios/icon/icon-44@2x.png" width="88" /> + <icon height="172" src="resources/ios/icon/icon-86@2x.png" width="172" /> + <icon height="196" src="resources/ios/icon/icon-98@2x.png" width="196" /> + <icon height="216" src="resources/ios/icon/icon-108@2x.png" width="216" /> + <icon height="40" src="resources/ios/icon/icon-40.png" width="40" /> + <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /> + <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /> + <icon height="50" src="resources/ios/icon/icon-50.png" width="50" /> + <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /> + <icon height="60" src="resources/ios/icon/icon-60.png" width="60" /> + <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /> + <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /> + <icon height="72" src="resources/ios/icon/icon-72.png" width="72" /> + <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /> + <icon height="76" src="resources/ios/icon/icon-76.png" width="76" /> + <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /> + <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /> + <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /> + <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /> + <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /> + <splash height="2688" src="resources/ios/splash/Default-2688h~iphone.png" width="1242" /> + <splash height="1242" src="resources/ios/splash/Default-Landscape-2688h~iphone.png" width="2688" /> + <splash height="1792" src="resources/ios/splash/Default-1792h~iphone.png" width="828" /> + <splash height="828" src="resources/ios/splash/Default-Landscape-1792h~iphone.png" width="1792" /> + <splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" /> + <splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" /> + <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /> + <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /> + <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /> + <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /> + <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /> + <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /> + <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /> + <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /> + <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /> + <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> + <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /> <hook src="scripts/plist-hook.js" type="after_prepare" /> <preference name="AllowInlineMediaPlayback" value="true" /> <preference name="BackupWebStorage" value="local" /> diff --git a/StoneIsland/platforms/ios/frameworks.json b/StoneIsland/platforms/ios/frameworks.json index 9e798fb9..c32aaa39 100644 --- a/StoneIsland/platforms/ios/frameworks.json +++ b/StoneIsland/platforms/ios/frameworks.json @@ -2,5 +2,7 @@ "AudioToolbox.framework": 1, "AuthenticationServices.framework": 1, "CoreTelephony.framework": 1, - "CoreLocation.framework": 1 + "CoreLocation.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 index a40c5dff..ebbbec43 100644 --- a/StoneIsland/platforms/ios/ios.json +++ b/StoneIsland/platforms/ios/ios.json @@ -54,6 +54,10 @@ { "xml": "<feature name=\"Geolocation\"><param name=\"ios-package\" value=\"CDVLocation\" /></feature>", "count": 1 + }, + { + "xml": "<feature name=\"SocialSharing\"><param name=\"ios-package\" value=\"SocialSharing\" /><param name=\"onload\" value=\"true\" /></feature>", + "count": 1 } ] } @@ -128,6 +132,12 @@ }, "cordova-plugin-geolocation": { "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "es6-promise-plugin": { + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-x-socialsharing": { + "PACKAGE_NAME": "us.okfoc.stoneisland" } }, "dependent_plugins": {}, @@ -211,6 +221,20 @@ "clobbers": [ "navigator.geolocation" ] + }, + { + "id": "es6-promise-plugin.Promise", + "file": "plugins/es6-promise-plugin/www/promise.js", + "pluginId": "es6-promise-plugin", + "runs": true + }, + { + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] } ], "plugin_metadata": { @@ -224,6 +248,8 @@ "cordova-plugin-firebasex": "10.2.0-cli", "cordova-plugin-ionic-keyboard": "2.2.0", "cordova-plugin-sim": "1.3.3", - "cordova-plugin-geolocation": "4.0.2" + "cordova-plugin-geolocation": "4.0.2", + "es6-promise-plugin": "4.2.2", + "cordova-plugin-x-socialsharing": "5.1.8" } } diff --git a/StoneIsland/platforms/ios/platform_www/cordova_plugins.js b/StoneIsland/platforms/ios/platform_www/cordova_plugins.js index 74e8a3a4..a5fc9f49 100644 --- a/StoneIsland/platforms/ios/platform_www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/platform_www/cordova_plugins.js @@ -79,6 +79,20 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "clobbers": [ "navigator.geolocation" ] + }, + { + "id": "es6-promise-plugin.Promise", + "file": "plugins/es6-promise-plugin/www/promise.js", + "pluginId": "es6-promise-plugin", + "runs": true + }, + { + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] } ]; module.exports.metadata = { @@ -92,6 +106,8 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "cordova-plugin-firebasex": "10.2.0-cli", "cordova-plugin-ionic-keyboard": "2.2.0", "cordova-plugin-sim": "1.3.3", - "cordova-plugin-geolocation": "4.0.2" + "cordova-plugin-geolocation": "4.0.2", + "es6-promise-plugin": "4.2.2", + "cordova-plugin-x-socialsharing": "5.1.8" }; });
\ No newline at end of file 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..9329adb6 --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js @@ -0,0 +1,143 @@ +cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { +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", []); +}; + +// this is the recommended way to share as it is the most feature-rich with respect to what you pass in and get back +SocialSharing.prototype.shareWithOptions = function (options, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareWithOptions"), "SocialSharing", "shareWithOptions", [options]); +}; + +SocialSharing.prototype.shareW3C = function (sharedata) { + return new Promise(function(resolve, reject) { + var options = { + subject: sharedata.title, + message: sharedata.text, + url: sharedata.url + }; + if(sharedata.hasOwnProperty('title') || + sharedata.hasOwnProperty('text') || + sharedata.hasOwnProperty('url')) { + cordova.exec(resolve, reject, "SocialSharing", "shareWithOptions", [options]); + } else { + reject(); + } + }); +}; + +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, null]); +}; + +SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToReceiver"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, receiver]); +}; + +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(); + navigator.share = window.plugins.socialsharing.shareW3C; + return window.plugins.socialsharing; +}; + +cordova.addConstructor(SocialSharing.install); + +}); diff --git a/StoneIsland/platforms/ios/platform_www/plugins/es6-promise-plugin/www/promise.js b/StoneIsland/platforms/ios/platform_www/plugins/es6-promise-plugin/www/promise.js new file mode 100644 index 00000000..6cce47ae --- /dev/null +++ b/StoneIsland/platforms/ios/platform_www/plugins/es6-promise-plugin/www/promise.js @@ -0,0 +1,13 @@ +cordova.define("es6-promise-plugin.Promise", function(require, exports, module) { +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.2+97478eb6 + */ + +!function t(e,n,r){function o(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(t){var n=e[u][1][t];return o(n?n:t)},a,a.exports,t,e,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t){void 0===window.Promise&&t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,e,n){(function(r,o){!function(t,r){"object"==typeof n&&"undefined"!=typeof e?e.exports=r():"function"==typeof define&&define.amd?define(r):t.ES6Promise=r()}(this,function(){"use strict";function e(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function n(t){return"function"==typeof t}function i(t){J=t}function u(t){Q=t}function s(){return function(){return r.nextTick(h)}}function c(){return"undefined"!=typeof I?function(){I(h)}:l()}function f(){var t=0,e=new X(h),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function a(){var t=new MessageChannel;return t.port1.onmessage=h,function(){return t.port2.postMessage(0)}}function l(){var t=setTimeout;return function(){return t(h,1)}}function h(){for(var t=0;H>t;t+=2){var e=te[t],n=te[t+1];e(n),te[t]=void 0,te[t+1]=void 0}H=0}function p(){try{var e=t,n=e("vertx");return I=n.runOnLoop||n.runOnContext,c()}catch(r){return l()}}function d(t,e){var n=this,r=new this.constructor(y);void 0===r[ne]&&D(r);var o=n._state;if(o){var i=arguments[o-1];Q(function(){return L(o,r,i,n._result)})}else O(n,r,t,e);return r}function v(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(y);return E(n,t),n}function y(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ue.error=e,ue}}function g(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function b(t,e,n){Q(function(t){var r=!1,o=g(n,e,function(n){r||(r=!0,e!==n?E(t,n):j(t,n))},function(e){r||(r=!0,x(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,x(t,o))},t)}function T(t,e){e._state===oe?j(t,e._result):e._state===ie?x(t,e._result):O(e,void 0,function(e){return E(t,e)},function(e){return x(t,e)})}function A(t,e,r){e.constructor===t.constructor&&r===d&&e.constructor.resolve===v?T(t,e):r===ue?(x(t,ue.error),ue.error=null):void 0===r?j(t,e):n(r)?b(t,e,r):j(t,e)}function E(t,n){t===n?x(t,m()):e(n)?A(t,n,w(n)):j(t,n)}function S(t){t._onerror&&t._onerror(t._result),M(t)}function j(t,e){t._state===re&&(t._result=e,t._state=oe,0!==t._subscribers.length&&Q(M,t))}function x(t,e){t._state===re&&(t._state=ie,t._result=e,Q(S,t))}function O(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+oe]=n,o[i+ie]=r,0===i&&t._state&&Q(M,t)}function M(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,u=0;u<e.length;u+=3)r=e[u],o=e[u+n],r?L(n,r,o,i):o(i);t._subscribers.length=0}}function P(){this.error=null}function C(t,e){try{return t(e)}catch(n){return se.error=n,se}}function L(t,e,r,o){var i=n(r),u=void 0,s=void 0,c=void 0,f=void 0;if(i){if(u=C(r,o),u===se?(f=!0,s=u.error,u.error=null):c=!0,e===u)return x(e,_()),void 0}else u=o,c=!0;e._state!==re||(i&&c?E(e,u):f?x(e,s):t===oe?j(e,u):t===ie&&x(e,u))}function k(t,e){try{e(function(e){E(t,e)},function(e){x(t,e)})}catch(n){x(t,n)}}function q(){return ce++}function D(t){t[ne]=ce++,t._state=void 0,t._result=void 0,t._subscribers=[]}function F(){return new Error("Array Methods must be provided an Array")}function F(){return new Error("Array Methods must be provided an Array")}function N(t){return new fe(this,t).promise}function U(t){var e=this;return G(t)?new e(function(n,r){for(var o=t.length,i=0;o>i;i++)e.resolve(t[i]).then(n,r)}):new e(function(t,e){return e(new TypeError("You must pass an array to race."))})}function Y(t){var e=this,n=new e(y);return x(n,t),n}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(){var t=void 0;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=ae}var B=void 0;B=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G=B,H=0,I=void 0,J=void 0,Q=function(t,e){te[H]=t,te[H+1]=e,H+=2,2===H&&(J?J(h):ee())},R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof r&&"[object process]"==={}.toString.call(r),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3),ee=void 0;ee=Z?s():X?f():$?a():void 0===R&&"function"==typeof t?p():l();var ne=Math.random().toString(36).substring(16),re=void 0,oe=1,ie=2,ue=new P,se=new P,ce=0,fe=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(y),this.promise[ne]||D(this.promise),G(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&j(this.promise,this._result))):x(this.promise,F())}return t.prototype._enumerate=function(t){for(var e=0;this._state===re&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===v){var o=w(t);if(o===d&&t._state!==re)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===ae){var i=new n(y);A(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===re&&(this._remaining--,t===ie?x(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,function(t){return n._settledAt(oe,e,t)},function(t){return n._settledAt(ie,e,t)})},t}(),ae=function(){function t(e){this[ne]=q(),this._result=this._state=void 0,this._subscribers=[],y!==e&&("function"!=typeof e&&K(),this instanceof t?k(this,e):W())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return ae.prototype.then=d,ae.all=N,ae.race=U,ae.resolve=v,ae.reject=Y,ae._setScheduler=i,ae._setAsap=u,ae._asap=Q,ae.polyfill=z,ae.Promise=ae,ae})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],3:[function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(a===setTimeout)return setTimeout(t,0);if((a===n||!a)&&setTimeout)return a=setTimeout,setTimeout(t,0);try{return a(t,0)}catch(e){try{return a.call(null,t,0)}catch(e){return a.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function u(){v&&p&&(v=!1,p.length?d=p.concat(d):y=-1,d.length&&s())}function s(){if(!v){var t=o(u);v=!0;for(var e=d.length;e;){for(p=d,d=[];++y<e;)p&&p[y].run();y=-1,e=d.length}p=null,v=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function f(){}var a,l,h=e.exports={};!function(){try{a="function"==typeof setTimeout?setTimeout:n}catch(t){a=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(t){l=r}}();var p,d=[],v=!1,y=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=f,h.addListener=f,h.once=f,h.off=f,h.removeListener=f,h.removeAllListeners=f,h.emit=f,h.prependListener=f,h.prependOnceListener=f,h.listeners=function(){return[]},h.binding=function(){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}]},{},[1]); + + +}); diff --git a/StoneIsland/platforms/ios/www/cordova_plugins.js b/StoneIsland/platforms/ios/www/cordova_plugins.js index 74e8a3a4..a5fc9f49 100644 --- a/StoneIsland/platforms/ios/www/cordova_plugins.js +++ b/StoneIsland/platforms/ios/www/cordova_plugins.js @@ -79,6 +79,20 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "clobbers": [ "navigator.geolocation" ] + }, + { + "id": "es6-promise-plugin.Promise", + "file": "plugins/es6-promise-plugin/www/promise.js", + "pluginId": "es6-promise-plugin", + "runs": true + }, + { + "id": "cordova-plugin-x-socialsharing.SocialSharing", + "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", + "pluginId": "cordova-plugin-x-socialsharing", + "clobbers": [ + "window.plugins.socialsharing" + ] } ]; module.exports.metadata = { @@ -92,6 +106,8 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "cordova-plugin-firebasex": "10.2.0-cli", "cordova-plugin-ionic-keyboard": "2.2.0", "cordova-plugin-sim": "1.3.3", - "cordova-plugin-geolocation": "4.0.2" + "cordova-plugin-geolocation": "4.0.2", + "es6-promise-plugin": "4.2.2", + "cordova-plugin-x-socialsharing": "5.1.8" }; });
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/css/blogs.css b/StoneIsland/platforms/ios/www/css/blogs.css index ee54a31f..f56ec474 100755 --- a/StoneIsland/platforms/ios/www/css/blogs.css +++ b/StoneIsland/platforms/ios/www/css/blogs.css @@ -36,7 +36,8 @@ text-decoration: underline; } #story .content > div { - display:none; + display: none; + padding-bottom: env(safe-area-inset-bottom); } #story .content div.active { display:block; @@ -340,7 +341,7 @@ ul.links { #archive .scroll { top: 0; left: 0; - height: calc(100% - 125px); + height: 100%; } #archive .row:first-of-type { margin-top: 7em; diff --git a/StoneIsland/platforms/ios/www/css/index.css b/StoneIsland/platforms/ios/www/css/index.css index 2130c675..496a0ee4 100755 --- a/StoneIsland/platforms/ios/www/css/index.css +++ b/StoneIsland/platforms/ios/www/css/index.css @@ -2,8 +2,8 @@ -webkit-tap-highlight-color: rgba(0,0,0,0); } body, html { - height: 100%; - width: 100%; + height: 100vh; + width: 100vw; margin: 0px; padding: 0px; overflow: hidden; @@ -18,7 +18,6 @@ body { background: #fff; font-family: pfd, sans-serif; font-size: 0.875rem; - padding-top: constant(safe-area-inset-top); } a, a:visited { color: #000; @@ -60,6 +59,7 @@ a, a:visited { } .vscroll .scroll { width: 100%; + overflow-x: hidden; /* height: calc(100vh - 2.5rem); overflow: scroll; -webkit-overflow-scrolling: touch; diff --git a/StoneIsland/platforms/ios/www/css/nav.css b/StoneIsland/platforms/ios/www/css/nav.css index 8ae57921..bd6747b1 100755 --- a/StoneIsland/platforms/ios/www/css/nav.css +++ b/StoneIsland/platforms/ios/www/css/nav.css @@ -3,7 +3,9 @@ #nav { position: fixed; - top: 0; left: 0; + top: env(safe-area-inset-top); + left: 0; + height: calc(100vh - env(safe-area-inset-top)); width: 249px; -webkit-transform: translateZ(0) translateX(-249px); -webkit-transition: -webkit-transform 0.1s; @@ -11,8 +13,10 @@ } #content { position: fixed; - top: 0; left: 0; - width: 100%; height: 100%; + top: env(safe-area-inset-top); + left: 0; + width: 100%; + height: calc(100vh - env(safe-area-inset-top)); overflow: hidden; -webkit-transform: translateZ(0) translateX(0px); -webkit-transition: -webkit-transform 0.1s; @@ -88,7 +92,7 @@ position: absolute; width: 100%; padding: 20px 0; - top:0; + top: 0; border-top: 1px solid #ddd; } @@ -102,9 +106,10 @@ #nav .social { position: absolute; - top: calc(100vh - 48px); + bottom: env(safe-area-inset-bottom); left: 0; border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; display: flex; flex-direction: row; } @@ -162,7 +167,7 @@ #nav-container { display:flex; - height:calc(100vh - 40px); + height: 100%; width:100%; position:absolute; flex-direction: column; @@ -343,9 +348,13 @@ padding-bottom:0px; #footer { display: block; position: fixed; - bottom: 0; left: 0; width: 100%; + bottom: 0; + left: 0; + width: 100%; background: #fff; border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin-bottom: env(safe-area-inset-bottom); z-index: 1; } #footer div { diff --git a/StoneIsland/platforms/ios/www/css/vendor/imageviewer.css b/StoneIsland/platforms/ios/www/css/vendor/imageviewer.css index 739c37a1..90d80fde 100644 --- a/StoneIsland/platforms/ios/www/css/vendor/imageviewer.css +++ b/StoneIsland/platforms/ios/www/css/vendor/imageviewer.css @@ -26,7 +26,7 @@ height: 48px; position: fixed; right: 20px; - top: 20px; + top: calc(20px + env(safe-area-inset-top)); cursor: pointer; text-align: center; overflow: hidden; diff --git a/StoneIsland/platforms/ios/www/index.html b/StoneIsland/platforms/ios/www/index.html index d8065176..46c79c98 100755 --- a/StoneIsland/platforms/ios/www/index.html +++ b/StoneIsland/platforms/ios/www/index.html @@ -15,7 +15,7 @@ <meta http-equiv="Content-Security-Policy" content="default-src * gap: 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com https://www.google-analytics.com; script-src * 'unsafe-inline' 'unsafe-eval'; object-src * 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com https://www.google-analytics.com; style-src * 'unsafe-inline' 'unsafe-eval'; img-src * 'unsafe-inline' 'unsafe-eval'; media-src * 'unsafe-inline' 'unsafe-eval'; frame-src * gap: 'unsafe-inline' 'unsafe-eval' https://ssl.gstatic.com https://www.google-analytics.com; font-src * 'unsafe-inline' 'unsafe-eval'; connect-src * 'unsafe-inline' 'unsafe-eval'"> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> - <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height"> + <meta name="viewport" content="user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, width=device-width, height=device-height, viewport-fit=cover"> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" href="css/fonts/fonts.css"> <link rel="stylesheet" type="text/css" href="css/fonts/ionicons.css"> @@ -122,7 +122,9 @@ <div id="story" role="region" aria-label="Stone Island Story"> <div class="scroll"> <h1 role="menuitem" aria-label="Current section: Stone Island Story">STORY</h1> - <img> + <div> + <img> + </div> <ul class="links"></ul> <div class="content"> <script type="text/html" class="template"> diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js b/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js index a18ad5b3..c91582f0 100644 --- a/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/accessibility.js @@ -1,4 +1,5 @@ var accessibility = (function() { + $('html').addClass('vscroll') var accessibility = {} accessibility.voiceOver = false @@ -43,7 +44,7 @@ var accessibility = (function() { $("html").addClass('accessible') $('html').addClass('vscroll') } else { - $('html').addClass('iscroll') + // $('html').addClass('iscroll') } ready() }) diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/push.js b/StoneIsland/platforms/ios/www/js/lib/etc/push.js index 1f0ab9b6..6158f04b 100755 --- a/StoneIsland/platforms/ios/www/js/lib/etc/push.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/push.js @@ -163,6 +163,6 @@ var push = (function(){ } push.error = function(e){ console.log("push error") - } + } return push })()
\ No newline at end of file diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js b/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js index 253921e1..51e14a01 100644 --- a/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js +++ b/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js @@ -22,8 +22,9 @@ function NativeScroll(el) { } function ScrollFactory (el, opt) { - if (accessibility.voiceOver) { - return NativeScroll(el) - } - return new IScroll(el, opt) + return NativeScroll(el) + // if (accessibility.voiceOver) { + // return NativeScroll(el) + // } + // return new IScroll(el, opt) } diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js new file mode 100644 index 00000000..9329adb6 --- /dev/null +++ b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js @@ -0,0 +1,143 @@ +cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { +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", []); +}; + +// this is the recommended way to share as it is the most feature-rich with respect to what you pass in and get back +SocialSharing.prototype.shareWithOptions = function (options, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareWithOptions"), "SocialSharing", "shareWithOptions", [options]); +}; + +SocialSharing.prototype.shareW3C = function (sharedata) { + return new Promise(function(resolve, reject) { + var options = { + subject: sharedata.title, + message: sharedata.text, + url: sharedata.url + }; + if(sharedata.hasOwnProperty('title') || + sharedata.hasOwnProperty('text') || + sharedata.hasOwnProperty('url')) { + cordova.exec(resolve, reject, "SocialSharing", "shareWithOptions", [options]); + } else { + reject(); + } + }); +}; + +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, null]); +}; + +SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToReceiver"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, receiver]); +}; + +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(); + navigator.share = window.plugins.socialsharing.shareW3C; + return window.plugins.socialsharing; +}; + +cordova.addConstructor(SocialSharing.install); + +}); diff --git a/StoneIsland/platforms/ios/www/plugins/es6-promise-plugin/www/promise.js b/StoneIsland/platforms/ios/www/plugins/es6-promise-plugin/www/promise.js new file mode 100644 index 00000000..6cce47ae --- /dev/null +++ b/StoneIsland/platforms/ios/www/plugins/es6-promise-plugin/www/promise.js @@ -0,0 +1,13 @@ +cordova.define("es6-promise-plugin.Promise", function(require, exports, module) { +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.2+97478eb6 + */ + +!function t(e,n,r){function o(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(t){var n=e[u][1][t];return o(n?n:t)},a,a.exports,t,e,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u<r.length;u++)o(r[u]);return o}({1:[function(t){void 0===window.Promise&&t("es6-promise").polyfill()},{"es6-promise":2}],2:[function(t,e,n){(function(r,o){!function(t,r){"object"==typeof n&&"undefined"!=typeof e?e.exports=r():"function"==typeof define&&define.amd?define(r):t.ES6Promise=r()}(this,function(){"use strict";function e(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function n(t){return"function"==typeof t}function i(t){J=t}function u(t){Q=t}function s(){return function(){return r.nextTick(h)}}function c(){return"undefined"!=typeof I?function(){I(h)}:l()}function f(){var t=0,e=new X(h),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function a(){var t=new MessageChannel;return t.port1.onmessage=h,function(){return t.port2.postMessage(0)}}function l(){var t=setTimeout;return function(){return t(h,1)}}function h(){for(var t=0;H>t;t+=2){var e=te[t],n=te[t+1];e(n),te[t]=void 0,te[t+1]=void 0}H=0}function p(){try{var e=t,n=e("vertx");return I=n.runOnLoop||n.runOnContext,c()}catch(r){return l()}}function d(t,e){var n=this,r=new this.constructor(y);void 0===r[ne]&&D(r);var o=n._state;if(o){var i=arguments[o-1];Q(function(){return L(o,r,i,n._result)})}else O(n,r,t,e);return r}function v(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(y);return E(n,t),n}function y(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ue.error=e,ue}}function g(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function b(t,e,n){Q(function(t){var r=!1,o=g(n,e,function(n){r||(r=!0,e!==n?E(t,n):j(t,n))},function(e){r||(r=!0,x(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,x(t,o))},t)}function T(t,e){e._state===oe?j(t,e._result):e._state===ie?x(t,e._result):O(e,void 0,function(e){return E(t,e)},function(e){return x(t,e)})}function A(t,e,r){e.constructor===t.constructor&&r===d&&e.constructor.resolve===v?T(t,e):r===ue?(x(t,ue.error),ue.error=null):void 0===r?j(t,e):n(r)?b(t,e,r):j(t,e)}function E(t,n){t===n?x(t,m()):e(n)?A(t,n,w(n)):j(t,n)}function S(t){t._onerror&&t._onerror(t._result),M(t)}function j(t,e){t._state===re&&(t._result=e,t._state=oe,0!==t._subscribers.length&&Q(M,t))}function x(t,e){t._state===re&&(t._state=ie,t._result=e,Q(S,t))}function O(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+oe]=n,o[i+ie]=r,0===i&&t._state&&Q(M,t)}function M(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,u=0;u<e.length;u+=3)r=e[u],o=e[u+n],r?L(n,r,o,i):o(i);t._subscribers.length=0}}function P(){this.error=null}function C(t,e){try{return t(e)}catch(n){return se.error=n,se}}function L(t,e,r,o){var i=n(r),u=void 0,s=void 0,c=void 0,f=void 0;if(i){if(u=C(r,o),u===se?(f=!0,s=u.error,u.error=null):c=!0,e===u)return x(e,_()),void 0}else u=o,c=!0;e._state!==re||(i&&c?E(e,u):f?x(e,s):t===oe?j(e,u):t===ie&&x(e,u))}function k(t,e){try{e(function(e){E(t,e)},function(e){x(t,e)})}catch(n){x(t,n)}}function q(){return ce++}function D(t){t[ne]=ce++,t._state=void 0,t._result=void 0,t._subscribers=[]}function F(){return new Error("Array Methods must be provided an Array")}function F(){return new Error("Array Methods must be provided an Array")}function N(t){return new fe(this,t).promise}function U(t){var e=this;return G(t)?new e(function(n,r){for(var o=t.length,i=0;o>i;i++)e.resolve(t[i]).then(n,r)}):new e(function(t,e){return e(new TypeError("You must pass an array to race."))})}function Y(t){var e=this,n=new e(y);return x(n,t),n}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(){var t=void 0;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=ae}var B=void 0;B=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G=B,H=0,I=void 0,J=void 0,Q=function(t,e){te[H]=t,te[H+1]=e,H+=2,2===H&&(J?J(h):ee())},R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof r&&"[object process]"==={}.toString.call(r),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3),ee=void 0;ee=Z?s():X?f():$?a():void 0===R&&"function"==typeof t?p():l();var ne=Math.random().toString(36).substring(16),re=void 0,oe=1,ie=2,ue=new P,se=new P,ce=0,fe=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(y),this.promise[ne]||D(this.promise),G(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&j(this.promise,this._result))):x(this.promise,F())}return t.prototype._enumerate=function(t){for(var e=0;this._state===re&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===v){var o=w(t);if(o===d&&t._state!==re)this._settledAt(t._state,e,t._result);else if("function"!=typeof o)this._remaining--,this._result[e]=t;else if(n===ae){var i=new n(y);A(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e)},t.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===re&&(this._remaining--,t===ie?x(r,n):this._result[e]=n),0===this._remaining&&j(r,this._result)},t.prototype._willSettleAt=function(t,e){var n=this;O(t,void 0,function(t){return n._settledAt(oe,e,t)},function(t){return n._settledAt(ie,e,t)})},t}(),ae=function(){function t(e){this[ne]=q(),this._result=this._state=void 0,this._subscribers=[],y!==e&&("function"!=typeof e&&K(),this instanceof t?k(this,e):W())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var e=this,n=e.constructor;return e.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){return n.resolve(t()).then(function(){throw e})})},t}();return ae.prototype.then=d,ae.all=N,ae.race=U,ae.resolve=v,ae.reject=Y,ae._setScheduler=i,ae._setAsap=u,ae._asap=Q,ae.polyfill=z,ae.Promise=ae,ae})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:3}],3:[function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(a===setTimeout)return setTimeout(t,0);if((a===n||!a)&&setTimeout)return a=setTimeout,setTimeout(t,0);try{return a(t,0)}catch(e){try{return a.call(null,t,0)}catch(e){return a.call(this,t,0)}}}function i(t){if(l===clearTimeout)return clearTimeout(t);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(t);try{return l(t)}catch(e){try{return l.call(null,t)}catch(e){return l.call(this,t)}}}function u(){v&&p&&(v=!1,p.length?d=p.concat(d):y=-1,d.length&&s())}function s(){if(!v){var t=o(u);v=!0;for(var e=d.length;e;){for(p=d,d=[];++y<e;)p&&p[y].run();y=-1,e=d.length}p=null,v=!1,i(t)}}function c(t,e){this.fun=t,this.array=e}function f(){}var a,l,h=e.exports={};!function(){try{a="function"==typeof setTimeout?setTimeout:n}catch(t){a=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(t){l=r}}();var p,d=[],v=!1,y=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new c(t,e)),1!==d.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},h.title="browser",h.browser=!0,h.env={},h.argv=[],h.version="",h.versions={},h.on=f,h.addListener=f,h.once=f,h.off=f,h.removeListener=f,h.removeAllListeners=f,h.emit=f,h.prependListener=f,h.prependOnceListener=f,h.listeners=function(){return[]},h.binding=function(){throw new Error("process.binding is not supported")},h.cwd=function(){return"/"},h.chdir=function(){throw new Error("process.chdir is not supported")},h.umask=function(){return 0}},{}]},{},[1]); + + +}); |
