From e760f95dc843cf11367d1aea0ed832991964584a Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 3 Dec 2015 00:23:09 -0500 Subject: rebuild project --- .../ios/CordovaLib/Classes/CDVAvailability.h | 5 +- .../CordovaLib/Classes/CDVCommandDelegateImpl.m | 2 +- .../platforms/ios/CordovaLib/Classes/CDVPlugin.h | 2 +- .../ios/CordovaLib/Classes/CDVViewController.h | 14 +- .../ios/CordovaLib/Classes/CDVViewController.m | 30 +- .../ios/CordovaLib/Classes/CDVWebViewDelegate.m | 6 +- .../ios/CordovaLib/Classes/NSData+Base64.h | 4 +- .../xcschemes/CordovaLib.xcscheme | 77 ----- .../xcschemes/xcschememanagement.plist | 22 -- .../user.xcuserdatad/xcschemes/CordovaLib.xcscheme | 77 ----- .../xcschemes/xcschememanagement.plist | 22 -- StoneIsland/platforms/ios/CordovaLib/VERSION | 2 +- StoneIsland/platforms/ios/CordovaLib/cordova.js | 224 +++++++++++-- .../ios/Stone Island.xcodeproj/project.pbxproj | 229 ++++++------- .../project.xcworkspace/contents.xcworkspacedata | 7 - .../xcshareddata/StoneIsland.xccheckout | 41 --- .../UserInterfaceState.xcuserstate | Bin 13567 -> 0 bytes .../UserInterfaceState.xcuserstate | Bin 9021 -> 0 bytes .../ios/Stone Island/Classes/AppDelegate.h | 4 +- .../ios/Stone Island/Classes/AppDelegate.m | 8 +- .../ios/Stone Island/Classes/MainViewController.h | 2 +- .../ios/Stone Island/Classes/MainViewController.m | 2 +- .../ios/Stone Island/Resources/icons/icon-40.png | Bin 0 -> 4082 bytes .../Stone Island/Resources/icons/icon-40@2x.png | Bin 0 -> 7411 bytes .../ios/Stone Island/Resources/icons/icon-50.png | Bin 0 -> 4874 bytes .../Stone Island/Resources/icons/icon-50@2x.png | Bin 0 -> 9611 bytes .../ios/Stone Island/Resources/icons/icon-60.png | Bin 0 -> 5811 bytes .../Stone Island/Resources/icons/icon-60@2x.png | Bin 0 -> 11924 bytes .../Stone Island/Resources/icons/icon-60@3x.png | Bin 0 -> 30083 bytes .../ios/Stone Island/Resources/icons/icon-72.png | Bin 0 -> 4944 bytes .../Stone Island/Resources/icons/icon-72@2x.png | Bin 0 -> 11706 bytes .../ios/Stone Island/Resources/icons/icon-76.png | Bin 0 -> 7025 bytes .../Stone Island/Resources/icons/icon-76@2x.png | Bin 0 -> 15262 bytes .../Stone Island/Resources/icons/icon-small.png | Bin 0 -> 3294 bytes .../Stone Island/Resources/icons/icon-small@2x.png | Bin 0 -> 5608 bytes .../ios/Stone Island/Resources/icons/icon.png | Bin 0 -> 3902 bytes .../ios/Stone Island/Resources/icons/icon@2x.png | Bin 0 -> 7869 bytes .../ios/Stone Island/Stone Island-Info.plist | 24 +- .../ios/Stone Island/Stone Island-Prefix.pch | 2 +- StoneIsland/platforms/ios/Stone Island/config.xml | 58 ++-- StoneIsland/platforms/ios/Stone Island/main.m | 2 +- .../platforms/ios/cordova/build-debug.xcconfig | 3 +- .../platforms/ios/cordova/build-extras.xcconfig | 22 ++ .../platforms/ios/cordova/build-release.xcconfig | 4 +- StoneIsland/platforms/ios/cordova/build.xcconfig | 4 +- StoneIsland/platforms/ios/cordova/check_reqs.bat | 25 ++ StoneIsland/platforms/ios/cordova/lib/build.js | 79 ++++- .../platforms/ios/cordova/lib/check_reqs.js | 112 +++++-- .../ios/cordova/lib/copy-www-build-step.js | 69 ++++ .../ios/cordova/lib/copy-www-build-step.sh | 87 ----- StoneIsland/platforms/ios/cordova/lib/list-devices | 24 +- .../platforms/ios/cordova/lib/list-emulator-images | 3 +- StoneIsland/platforms/ios/cordova/lib/run.js | 4 +- StoneIsland/platforms/ios/cordova/version | 2 +- StoneIsland/platforms/ios/ios.json | 90 +++--- StoneIsland/platforms/ios/platform_www/cordova.js | 224 +++++++++++-- .../platforms/ios/platform_www/cordova_plugins.js | 40 +-- StoneIsland/platforms/ios/www/cordova.js | 224 +++++++++++-- StoneIsland/platforms/ios/www/cordova_plugins.js | 141 -------- .../img/Resources/CDVNotification.bundle/beep.wav | Bin 0 -> 8114 bytes .../Resources/splash/Default-568h@2x~iphone.png | Bin 0 -> 34225 bytes .../ios/www/img/Resources/splash/Default-667h.png | Bin 0 -> 57532 bytes .../ios/www/img/Resources/splash/Default-736h.png | Bin 0 -> 80929 bytes .../Resources/splash/Default-Landscape-736h.png | Bin 0 -> 79491 bytes .../Resources/splash/Default-Landscape@2x~ipad.png | Bin 0 -> 212234 bytes .../Resources/splash/Default-Landscape~ipad.png | Bin 0 -> 91810 bytes .../Resources/splash/Default-Portrait@2x~ipad.png | Bin 0 -> 212860 bytes .../img/Resources/splash/Default-Portrait~ipad.png | Bin 0 -> 91713 bytes .../www/img/Resources/splash/Default@2x~iphone.png | Bin 0 -> 29475 bytes .../www/img/Resources/splash/Default~iphone.png | Bin 0 -> 10394 bytes .../www/plugins/com.ionic.keyboard/www/keyboard.js | 39 --- .../www/console-via-logger.js | 189 ----------- .../plugins/cordova-plugin-console/www/logger.js | 357 --------------------- .../www/ios/LaunchMyApp.js | 11 - .../plugins/cordova-plugin-device/www/device.js | 81 ----- .../cordova-plugin-dialogs/www/notification.js | 114 ------- .../cordova-plugin-geolocation/www/Coordinates.js | 71 ---- .../cordova-plugin-geolocation/www/Position.js | 35 -- .../www/PositionError.js | 40 --- .../cordova-plugin-geolocation/www/geolocation.js | 213 ------------ .../www/Connection.js | 36 --- .../www/network.js | 93 ------ .../www/splashscreen.js | 35 -- .../www/SocialSharing.js | 117 ------- .../www/plugins/phonegap-plugin-push/www/push.js | 231 ------------- StoneIsland/platforms/platforms.json | 2 +- StoneIsland/plugins/ios.json | 141 ++------ 87 files changed, 1177 insertions(+), 2651 deletions(-) delete mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme delete mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme delete mode 100644 StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout delete mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40@2x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50@2x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@2x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@3x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72@2x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76@2x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small@2x.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon.png create mode 100644 StoneIsland/platforms/ios/Stone Island/Resources/icons/icon@2x.png create mode 100755 StoneIsland/platforms/ios/cordova/build-extras.xcconfig create mode 100755 StoneIsland/platforms/ios/cordova/check_reqs.bat create mode 100755 StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js delete mode 100755 StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.sh delete mode 100644 StoneIsland/platforms/ios/www/cordova_plugins.js create mode 100644 StoneIsland/platforms/ios/www/img/Resources/CDVNotification.bundle/beep.wav create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-568h@2x~iphone.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-667h.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-736h.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-Landscape-736h.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-Landscape@2x~ipad.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-Landscape~ipad.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-Portrait@2x~ipad.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default-Portrait~ipad.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default@2x~iphone.png create mode 100644 StoneIsland/platforms/ios/www/img/Resources/splash/Default~iphone.png delete mode 100644 StoneIsland/platforms/ios/www/plugins/com.ionic.keyboard/www/keyboard.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/console-via-logger.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-console/www/logger.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-device/www/device.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-dialogs/www/notification.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Coordinates.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/Position.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/PositionError.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-geolocation/www/geolocation.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js delete mode 100644 StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h index 71e20b97..059152ea 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVAvailability.h @@ -55,6 +55,9 @@ #define __CORDOVA_3_6_0 30600 #define __CORDOVA_3_7_0 30700 #define __CORDOVA_3_8_0 30800 +#define __CORDOVA_3_9_0 30900 +#define __CORDOVA_3_9_1 30901 +#define __CORDOVA_3_9_2 30902 #define __CORDOVA_NA 99999 /* not available */ /* @@ -65,7 +68,7 @@ #endif */ #ifndef CORDOVA_VERSION_MIN_REQUIRED - #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_8_0 + #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_3_9_2 #endif /* diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m index 9407e0a8..be7eb63a 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVCommandDelegateImpl.m @@ -143,7 +143,7 @@ - (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop { - js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})", js]; + js = [NSString stringWithFormat:@"try{cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})}catch(e){console.log('exeption nativeEvalAndFetch : '+e);};", js]; if (scheduledOnRunLoop) { [self evalJsHelper:js]; } else { diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h index 5e8b2830..c9991e57 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVPlugin.h @@ -38,7 +38,7 @@ extern NSString* const CDVRemoteNotificationError; @property (readonly, assign) BOOL hasPendingOperation; -- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView; +- (CDVPlugin*)initWithWebView:(UIWebView*)theWebView CDV_DEPRECATED(3.9.2, "Use pluginInitialize method instead. This will be removed in 4.0.0"); - (void)pluginInitialize; - (void)handleOpenURL:(NSNotification*)notification; diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h index 51863a59..ed114049 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.h @@ -41,8 +41,8 @@ @property (nonatomic, readonly, strong) NSDictionary* pluginsMap; @property (nonatomic, readonly, strong) NSMutableDictionary* settings; @property (nonatomic, readonly, strong) NSXMLParser* configParser; -@property (nonatomic, readonly, strong) CDVWhitelist* whitelist; // readonly for public -@property (nonatomic, readonly, assign) BOOL loadFromString; +@property (nonatomic, readonly, strong) CDVWhitelist* whitelist CDV_DEPRECATED(3.9.2, "Use URLisAllowed to check specific URL. This will be removed in 4.0.0"); // readonly for public +@property (nonatomic, readonly, assign) BOOL loadFromString CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0"); @property (nonatomic, readwrite, copy) NSString* wwwFolderName; @property (nonatomic, readwrite, copy) NSString* startPage; @@ -61,14 +61,14 @@ */ @property (nonatomic, readwrite, copy) NSString* baseUserAgent; -+ (NSDictionary*)getBundlePlist:(NSString*)plistName; -+ (NSString*)applicationDocumentsDirectory; ++ (NSDictionary*)getBundlePlist:(NSString*)plistName CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0"); ++ (NSString*)applicationDocumentsDirectory CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0"); -- (void)printMultitaskingInfo; -- (void)createGapView; +- (void)printMultitaskingInfo CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0"); +- (void)createGapView CDV_DEPRECATED(3.9.2, "This will be removed in 4.0.0"); - (UIWebView*)newCordovaViewWithFrame:(CGRect)bounds; -- (void)javascriptAlert:(NSString*)text; +- (void)javascriptAlert:(NSString*)text CDV_DEPRECATED(3.9.2, "Use the CDVCommandDelegate evalJs: directly. This will be removed in 4.0.0"); - (NSString*)appURLScheme; - (NSArray*)parseInterfaceOrientations:(NSArray*)orientations; diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m index 6d81e8d9..6bfabe42 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVViewController.m @@ -601,13 +601,22 @@ - (NSString*)userAgent { - if (_userAgent == nil) { - NSString* localBaseUserAgent; - if (self.baseUserAgent != nil) { - localBaseUserAgent = self.baseUserAgent; - } else { - localBaseUserAgent = [CDVUserAgentUtil originalUserAgent]; - } + if (_userAgent != nil) { + return _userAgent; + } + + NSString* localBaseUserAgent; + if (self.baseUserAgent != nil) { + localBaseUserAgent = self.baseUserAgent; + } else if ([self settingForKey:@"OverrideUserAgent"] != nil) { + localBaseUserAgent = [self settingForKey:@"OverrideUserAgent"]; + } else { + localBaseUserAgent = [CDVUserAgentUtil originalUserAgent]; + } + NSString* appendUserAgent = [self settingForKey:@"AppendUserAgent"]; + if (appendUserAgent) { + _userAgent = [NSString stringWithFormat:@"%@ %@", localBaseUserAgent, appendUserAgent]; + } else { // Use our address as a unique number to append to the User-Agent. _userAgent = [NSString stringWithFormat:@"%@ (%lld)", localBaseUserAgent, (long long)self]; } @@ -980,6 +989,13 @@ { // NSLog(@"%@",@"applicationWillEnterForeground"); [self.commandDelegate evalJs:@"cordova.fireDocumentEvent('resume');"]; + + /** Clipboard fix **/ + UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; + NSString *string = pasteboard.string; + if (string) { + [pasteboard setValue:string forPasteboardType:@"public.text"]; + } } // This method is called to let your application know that it moved from the inactive to active state. diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m index 514827e5..a7e29086 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/CDVWebViewDelegate.m @@ -197,7 +197,7 @@ static NSString *stripFragment(NSString* url) { NSString* scheme = [[request URL] scheme]; - if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"]) { + if ([scheme isEqualToString:@"mailto"] || [scheme isEqualToString:@"tel"] || [scheme isEqualToString:@"sms"] || [scheme isEqualToString:@"blob"]) { return YES; } @@ -251,10 +251,10 @@ static NSString *stripFragment(NSString* url) default: { - _loadCount = 0; - _state = STATE_WAITING_FOR_LOAD_START; NSString* description = [NSString stringWithFormat:@"CDVWebViewDelegate: Navigation started when state=%ld", (long)_state]; NSLog(@"%@", description); + _loadCount = 0; + _state = STATE_WAITING_FOR_LOAD_START; if ([_delegate respondsToSelector:@selector(webView:didFailLoadWithError:)]) { NSDictionary* errorDictionary = @{NSLocalizedDescriptionKey : description}; NSError* error = [[NSError alloc] initWithDomain:@"CDVWebViewDelegate" code:1 userInfo:errorDictionary]; diff --git a/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h b/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h index c92d1f6a..1633a72b 100644 --- a/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h +++ b/StoneIsland/platforms/ios/CordovaLib/Classes/NSData+Base64.h @@ -41,7 +41,7 @@ char *CDVNewBase64Encode( - (NSString*)base64EncodedString CDV_DEPRECATED(3.8 .0, "Use [NSData cdv_base64EncodedString]"); -+ (NSData*)cdv_dataFromBase64String:(NSString*)aString; -- (NSString*)cdv_base64EncodedString; ++ (NSData*)cdv_dataFromBase64String:(NSString*)aString CDV_DEPRECATED(3.9.2, "Use NSData initWithBase64EncodedString instead. This will be removed in 4.0.0"); +- (NSString*)cdv_base64EncodedString CDV_DEPRECATED(3.9.2, "Use NSData base64EncodedStringWithOptions instead. This will be removed in 4.0.0"); @end diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme deleted file mode 100644 index 5dce491f..00000000 --- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/CordovaLib.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 283503be..00000000 --- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/jules.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - CordovaLib.xcscheme - - orderHint - 1 - - - SuppressBuildableAutocreation - - D2AAC07D0554694100DB518D - - primary - - - - - diff --git a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme b/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme deleted file mode 100644 index 5b0b1fda..00000000 --- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/CordovaLib.xcscheme +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 deleted file mode 100644 index 283503be..00000000 --- a/StoneIsland/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/user.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - CordovaLib.xcscheme - - orderHint - 1 - - - SuppressBuildableAutocreation - - D2AAC07D0554694100DB518D - - primary - - - - - diff --git a/StoneIsland/platforms/ios/CordovaLib/VERSION b/StoneIsland/platforms/ios/CordovaLib/VERSION index 19811903..2009c7df 100644 --- a/StoneIsland/platforms/ios/CordovaLib/VERSION +++ b/StoneIsland/platforms/ios/CordovaLib/VERSION @@ -1 +1 @@ -3.8.0 +3.9.2 diff --git a/StoneIsland/platforms/ios/CordovaLib/cordova.js b/StoneIsland/platforms/ios/CordovaLib/cordova.js index 4f781077..46ab90b7 100644 --- a/StoneIsland/platforms/ios/CordovaLib/cordova.js +++ b/StoneIsland/platforms/ios/CordovaLib/cordova.js @@ -1,5 +1,5 @@ // Platform: ios -// fc4db9145934bd0053161cbf9ffc0caf83b770c6 +// 49a8db57fa070d20ea7b304a53ffec3d7250c5af /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '3.8.0'; +var PLATFORM_VERSION_BUILD_LABEL = '3.9.2'; // file: src/scripts/require.js /*jshint -W079 */ @@ -101,10 +101,17 @@ if (typeof module === "object" && typeof require === "function") { // file: src/cordova.js define("cordova", function(require, exports, module) { +// Workaround for Windows 10 in hosted environment case +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object +if (window.cordova && !(window.cordova instanceof HTMLElement)) { + throw new Error("cordova already defined"); +} + var channel = require('cordova/channel'); var platform = require('cordova/platform'); + /** * Intercept calls to addEventListener + removeEventListener and handle deviceready, * resume, and pause events. @@ -326,7 +333,6 @@ module.exports = cordova; // file: src/common/argscheck.js define("cordova/argscheck", function(require, exports, module) { -var exec = require('cordova/exec'); var utils = require('cordova/utils'); var moduleExports = module.exports; @@ -811,7 +817,7 @@ module.exports = channel; }); -// file: src/ios/exec.js +// file: e:/cordova/cordova-ios/cordova-js-src/exec.js define("cordova/exec", function(require, exports, module) { /** @@ -1220,6 +1226,7 @@ if (!window.console.warn) { // Register pause, resume and deviceready channels as events on document. channel.onPause = cordova.addDocumentEventHandler('pause'); channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); // Listen for DOMContentLoaded and notify our channel subscribers. @@ -1281,10 +1288,12 @@ define("cordova/init_b", function(require, exports, module) { var channel = require('cordova/channel'); var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); var utils = require('cordova/utils'); -var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady]; +var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady]; // setting exec cordova.exec = require('cordova/exec'); @@ -1347,6 +1356,7 @@ if (!window.console.warn) { // Register pause, resume and deviceready channels as events on document. channel.onPause = cordova.addDocumentEventHandler('pause'); channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); // Listen for DOMContentLoaded and notify our channel subscribers. @@ -1368,10 +1378,19 @@ if (window._nativeReady) { // Call the platform-specific initialization. platform.bootstrap && platform.bootstrap(); +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + /** * Create all cordova objects once native side is ready. */ channel.join(function() { + modulemapper.mapModules(window); platform.initialize && platform.initialize(); @@ -1490,7 +1509,104 @@ exports.reset(); }); -// file: src/ios/platform.js +// file: src/common/modulemapper_b.js +define("cordova/modulemapper_b", function(require, exports, module) { + +var builder = require('cordova/builder'), + symbolList = [], + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: e:/cordova/cordova-ios/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { module.exports = { @@ -1613,6 +1729,54 @@ exports.load = function(callback) { }; +}); + +// file: src/common/pluginloader_b.js +define("cordova/pluginloader_b", function(require, exports, module) { + +var modulemapper = require('cordova/modulemapper'); + +// Handler for the cordova_plugins.js content. +// See plugman's plugin_loader.js for the details of this object. +function handlePluginsObject(moduleList) { + // if moduleList is not defined or empty, we've nothing to do + if (!moduleList || !moduleList.length) { + return; + } + + // Loop through all the modules and then through their clobbers and merges. + for (var i = 0, module; module = moduleList[i]; i++) { + if (module.clobbers && module.clobbers.length) { + for (var j = 0; j < module.clobbers.length; j++) { + modulemapper.clobbers(module.id, module.clobbers[j]); + } + } + + if (module.merges && module.merges.length) { + for (var k = 0; k < module.merges.length; k++) { + modulemapper.merges(module.id, module.merges[k]); + } + } + + // Finally, if runs is truthy we want to simply require() the module. + if (module.runs) { + modulemapper.runs(module.id); + } + } +} + +// Loads all plugins' js-modules. Plugin loading is syncronous in browserified bundle +// but the method accepts callback to be compatible with non-browserify flow. +// onDeviceReady is blocked on onPluginsReady. onPluginsReady is fired when there are +// no plugins to load, or they are all done. +exports.load = function(callback) { + var moduleList = require("cordova/plugin_list"); + handlePluginsObject(moduleList); + + callback(); +}; + + }); // file: src/common/urlutil.js @@ -1694,15 +1858,14 @@ utils.typeName = function(val) { /** * Returns an indication of whether the argument is an array or not */ -utils.isArray = function(a) { - return utils.typeName(a) == 'Array'; -}; +utils.isArray = Array.isArray || + function(a) {return utils.typeName(a) == 'Array';}; /** * Returns an indication of whether the argument is a Date or not */ utils.isDate = function(d) { - return utils.typeName(d) == 'Date'; + return (d instanceof Date); }; /** @@ -1736,17 +1899,25 @@ utils.clone = function(obj) { * Returns a wrapped version of the function */ utils.close = function(context, func, params) { - if (typeof params == 'undefined') { - return function() { - return func.apply(context, arguments); - }; - } else { - return function() { - return func.apply(context, params); - }; - } + return function() { + var args = params || arguments; + return func.apply(context, args); + }; }; +//------------------------------------------------------------------------------ +function UUIDcreatePart(length) { + var uuidpart = ""; + for (var i=0; i - - - - diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout deleted file mode 100644 index 841af2bf..00000000 --- a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcshareddata/StoneIsland.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 7E1D02F6-0F9E-4C28-9F28-2E37CB639DF0 - IDESourceControlProjectName - StoneIsland - IDESourceControlProjectOriginsDictionary - - 10B248D89F55F057EF759644D7695723C40D8B27 - github.com:okfocus/stone-island.git - - IDESourceControlProjectPath - StoneIsland/platforms/ios/StoneIsland.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 10B248D89F55F057EF759644D7695723C40D8B27 - ../../../../.. - - IDESourceControlProjectURL - github.com:okfocus/stone-island.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 10B248D89F55F057EF759644D7695723C40D8B27 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 10B248D89F55F057EF759644D7695723C40D8B27 - IDESourceControlWCCName - stone-island - - - - diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index a8bb4a28..00000000 Binary files a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/jules.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate b/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 935dae0b..00000000 Binary files a/StoneIsland/platforms/ios/Stone Island.xcodeproj/project.xcworkspace/xcuserdata/user.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h index 2587ce10..ee3f0764 100644 --- a/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h +++ b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.h @@ -19,7 +19,7 @@ // // AppDelegate.h -// HelloCordova +// Stone Island // // Created by ___FULLUSERNAME___ on ___DATE___. // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. @@ -32,7 +32,7 @@ @interface AppDelegate : NSObject {} // invoke string is passed to your app on launch, this is only valid if you -// edit HelloCordova-Info.plist to add a protocol +// edit Stone Island-Info.plist to add a protocol // a simple tutorial can be found here : // http://iphonedevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m index 79e57538..c2d42df8 100644 --- a/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m +++ b/StoneIsland/platforms/ios/Stone Island/Classes/AppDelegate.m @@ -19,7 +19,7 @@ // // AppDelegate.m -// HelloCordova +// Stone Island // // Created by ___FULLUSERNAME___ on ___DATE___. // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. @@ -92,7 +92,7 @@ } // this happens while we are running ( in the background, or from within our own app ) -// only valid if HelloCordova-Info.plist specifies a protocol to handle +// only valid if Stone Island-Info.plist specifies a protocol to handle - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation { if (!url) { @@ -135,7 +135,11 @@ } #endif +#if __IPHONE_OS_VERSION_MAX_ALLOWED < 90000 - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window +#else +- (UIInterfaceOrientationMask)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window +#endif { // iPhone doesn't support upside down by default, while the iPad does. Override to allow all orientations always, and let the root view controller decide what's allowed (the supported orientations mask gets intersected). NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown); diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h index e17e798a..a9aaeeaf 100644 --- a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h +++ b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.h @@ -19,7 +19,7 @@ // // MainViewController.h -// HelloCordova +// Stone Island // // Created by ___FULLUSERNAME___ on ___DATE___. // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. diff --git a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m index 2fe5fc4b..a066b197 100644 --- a/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m +++ b/StoneIsland/platforms/ios/Stone Island/Classes/MainViewController.m @@ -19,7 +19,7 @@ // // MainViewController.h -// HelloCordova +// Stone Island // // Created by ___FULLUSERNAME___ on ___DATE___. // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40.png new file mode 100644 index 00000000..e865adbc Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40@2x.png new file mode 100644 index 00000000..6d07dce5 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-40@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50.png new file mode 100644 index 00000000..98a9d96d Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50@2x.png new file mode 100644 index 00000000..bac693f7 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-50@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60.png new file mode 100644 index 00000000..39a2b524 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@2x.png new file mode 100644 index 00000000..955af362 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@3x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@3x.png new file mode 100644 index 00000000..e1268916 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-60@3x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72.png new file mode 100644 index 00000000..8c6e5df3 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72@2x.png new file mode 100644 index 00000000..dd819da6 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-72@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76.png new file mode 100644 index 00000000..63afe7f1 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76@2x.png new file mode 100644 index 00000000..4cff29a2 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-76@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small.png new file mode 100644 index 00000000..0ea1c42f Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small@2x.png new file mode 100644 index 00000000..2c72038e Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon-small@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon.png new file mode 100644 index 00000000..b2571a71 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon@2x.png b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon@2x.png new file mode 100644 index 00000000..d75098f5 Binary files /dev/null and b/StoneIsland/platforms/ios/Stone Island/Resources/icons/icon@2x.png differ diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist index 0af71059..3926a624 100644 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Info.plist @@ -2,6 +2,11 @@ + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + CFBundleDevelopmentRegion English CFBundleDisplayName @@ -68,6 +73,8 @@ NSMainNibFile~ipad + UIRequiresFullScreen + UILaunchImages @@ -171,17 +178,6 @@ {768, 1024} - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSLocationWhenInUseUsageDescription - - UIBackgroundModes - - remote-notification - CFBundleURLTypes @@ -191,5 +187,11 @@ + NSLocationWhenInUseUsageDescription + + UIBackgroundModes + + remote-notification + \ No newline at end of file diff --git a/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch b/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch index e135f6ba..d1b4e1e8 100644 --- a/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch +++ b/StoneIsland/platforms/ios/Stone Island/Stone Island-Prefix.pch @@ -17,7 +17,7 @@ under the License. */ // -// Prefix header for all source files of the 'HelloCordova' target in the 'HelloCordova' project +// Prefix header for all source files of the 'Stone Island' target in the 'Stone Island' project // #ifdef __OBJC__ diff --git a/StoneIsland/platforms/ios/Stone Island/config.xml b/StoneIsland/platforms/ios/Stone Island/config.xml index 10d404b5..185c2505 100755 --- a/StoneIsland/platforms/ios/Stone Island/config.xml +++ b/StoneIsland/platforms/ios/Stone Island/config.xml @@ -14,35 +14,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -70,4 +41,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StoneIsland/platforms/ios/Stone Island/main.m b/StoneIsland/platforms/ios/Stone Island/main.m index 41282ad0..2c0b35c3 100644 --- a/StoneIsland/platforms/ios/Stone Island/main.m +++ b/StoneIsland/platforms/ios/Stone Island/main.m @@ -18,7 +18,7 @@ */ // // main.m -// HelloCordova +// Stone Island // // Created by ___FULLUSERNAME___ on ___DATE___. // Copyright ___ORGANIZATIONNAME___ ___YEAR___. All rights reserved. diff --git a/StoneIsland/platforms/ios/cordova/build-debug.xcconfig b/StoneIsland/platforms/ios/cordova/build-debug.xcconfig index 85748ea8..124d020b 100755 --- a/StoneIsland/platforms/ios/cordova/build-debug.xcconfig +++ b/StoneIsland/platforms/ios/cordova/build-debug.xcconfig @@ -21,4 +21,5 @@ // XCode Build settings for "Debug" Build Configuration. // -#include "build.xcconfig" \ No newline at end of file +#include "build.xcconfig" +#include "build-extras.xcconfig" diff --git a/StoneIsland/platforms/ios/cordova/build-extras.xcconfig b/StoneIsland/platforms/ios/cordova/build-extras.xcconfig new file mode 100755 index 00000000..7e631112 --- /dev/null +++ b/StoneIsland/platforms/ios/cordova/build-extras.xcconfig @@ -0,0 +1,22 @@ +// +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +// + +// +// Auto-generated config file to override configuration files (build-release/build-debug). +// diff --git a/StoneIsland/platforms/ios/cordova/build-release.xcconfig b/StoneIsland/platforms/ios/cordova/build-release.xcconfig index 6169afd4..674aa796 100755 --- a/StoneIsland/platforms/ios/cordova/build-release.xcconfig +++ b/StoneIsland/platforms/ios/cordova/build-release.xcconfig @@ -24,4 +24,6 @@ #include "build.xcconfig" CODE_SIGN_IDENTITY = iPhone Distribution -CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution \ No newline at end of file +CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Distribution + +#include "build-extras.xcconfig" diff --git a/StoneIsland/platforms/ios/cordova/build.xcconfig b/StoneIsland/platforms/ios/cordova/build.xcconfig index 0b89ad0f..54a5abd4 100755 --- a/StoneIsland/platforms/ios/cordova/build.xcconfig +++ b/StoneIsland/platforms/ios/cordova/build.xcconfig @@ -28,5 +28,5 @@ CODE_SIGN_IDENTITY = iPhone Developer CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer -// (CB-7872) Solution for XCode 6.1 signing errors related to resource envelope format deprecation -CODE_SIGN_RESOURCE_RULES_PATH = $(SDKROOT)/ResourceRules.plist \ No newline at end of file +// (CB-9721) Set ENABLE_BITCODE to NO in build.xcconfig +ENABLE_BITCODE = NO diff --git a/StoneIsland/platforms/ios/cordova/check_reqs.bat b/StoneIsland/platforms/ios/cordova/check_reqs.bat new file mode 100755 index 00000000..683914b8 --- /dev/null +++ b/StoneIsland/platforms/ios/cordova/check_reqs.bat @@ -0,0 +1,25 @@ +:: Licensed to the Apache Software Foundation (ASF) under one +:: or more contributor license agreements. See the NOTICE file +:: distributed with this work for additional information +:: regarding copyright ownership. The ASF licenses this file +:: to you under the Apache License, Version 2.0 (the +:: "License"); you may not use this file except in compliance +:: with the License. You may obtain a copy of the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, +:: software distributed under the License is distributed on an +:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +:: KIND, either express or implied. See the License for the +:: specific language governing permissions and limitations +:: under the License +@ECHO OFF +SET script_path="%~dp0check_reqs" +IF EXIST %script_path% ( + node "%script_path%" %* +) ELSE ( + ECHO. + ECHO ERROR: Could not find 'check_reqs' script in 'bin' folder, aborting...>&2 + EXIT /B 1 +) \ No newline at end of file diff --git a/StoneIsland/platforms/ios/cordova/lib/build.js b/StoneIsland/platforms/ios/cordova/lib/build.js index 153a4ec3..2213ef8c 100755 --- a/StoneIsland/platforms/ios/cordova/lib/build.js +++ b/StoneIsland/platforms/ios/cordova/lib/build.js @@ -24,9 +24,11 @@ var Q = require('q'), path = require('path'), shell = require('shelljs'), spawn = require('./spawn'), - check_reqs = require('./check_reqs'); + check_reqs = require('./check_reqs'), + fs = require('fs'); var projectPath = path.join(__dirname, '..', '..'); +var projectName = null; module.exports.run = function (argv) { @@ -36,6 +38,10 @@ module.exports.run = function (argv) { 'release': Boolean, 'device': Boolean, 'emulator': Boolean, + 'codeSignIdentity': String, + 'codeSignResourceRules': String, + 'provisioningProfile': String, + 'buildConfig' : String }, {'-r': '--release'}, argv); if (args.debug && args.release) { @@ -45,10 +51,42 @@ module.exports.run = function (argv) { if (args.device && args.emulator) { return Q.reject('Only one of "device"/"emulator" options should be specified'); } + + if(args.buildConfig) { + if(!fs.existsSync(args.buildConfig)) { + return Q.reject('Build config file does not exist:' + args.buildConfig); + } + console.log('Reading build config file:', path.resolve(args.buildConfig)); + var buildConfig = JSON.parse(fs.readFileSync(args.buildConfig, 'utf-8')); + if(buildConfig.ios) { + var buildType = args.release ? 'release' : 'debug'; + var config = buildConfig.ios[buildType]; + if(config) { + ['codeSignIdentity', 'codeSignResourceRules', 'provisioningProfile'].forEach( + function(key) { + args[key] = args[key] || config[key]; + }); + } + } + } return check_reqs.run().then(function () { return findXCodeProjectIn(projectPath); - }).then(function (projectName) { + }).then(function (name) { + projectName = name; + var extraConfig = ''; + if (args.codeSignIdentity) { + extraConfig += 'CODE_SIGN_IDENTITY = ' + args.codeSignIdentity + '\n'; + extraConfig += 'CODE_SIGN_IDENTITY[sdk=iphoneos*] = ' + args.codeSignIdentity + '\n'; + } + if (args.codeSignResourceRules) { + extraConfig += 'CODE_SIGN_RESOURCE_RULES_PATH = ' + args.codeSignResourceRules + '\n'; + } + if (args.provisioningProfile) { + extraConfig += 'PROVISIONING_PROFILE = ' + args.provisioningProfile + '\n'; + } + return Q.nfcall(fs.writeFile, path.join(__dirname, '..', 'build-extras.xcconfig'), extraConfig, 'utf-8'); + }).then(function () { var configuration = args.release ? 'Release' : 'Debug'; console.log('Building project : ' + path.join(projectPath, projectName + '.xcodeproj')); @@ -57,6 +95,23 @@ module.exports.run = function (argv) { var xcodebuildArgs = getXcodeArgs(projectName, projectPath, configuration, args.device); return spawn('xcodebuild', xcodebuildArgs, projectPath); + }).then(function () { + if (!args.device) { + return; + } + var buildOutputDir = path.join(projectPath, 'build', 'device'); + var pathToApp = path.join(buildOutputDir, projectName + '.app'); + var pathToIpa = path.join(buildOutputDir, projectName + '.ipa'); + var xcRunArgs = ['-sdk', 'iphoneos', 'PackageApplication', + '-v', pathToApp, + '-o', pathToIpa]; + if (args.codeSignIdentity) { + xcRunArgs.concat('--sign', args.codeSignIdentity); + } + if (args.provisioningProfile) { + xcRunArgs.concat('--embed', args.provisioningProfile); + } + return spawn('xcrun', xcRunArgs, projectPath); }); }; @@ -128,19 +183,27 @@ function getXcodeArgs(projectName, projectPath, configuration, isDevice) { // help/usage function module.exports.help = function help() { console.log(''); - console.log('Usage: build [ --debug | --release ] [--archs=\"\"] [--device | --simulator]'); - console.log(' --help : Displays this dialog.'); - console.log(' --debug : Builds project in debug mode. (Default)'); - console.log(' --release : Builds project in release mode.'); - console.log(' -r : Shortcut :: builds project in release mode.'); + console.log('Usage: build [--debug | --release] [--archs=\"\"]'); + console.log(' [--device | --simulator] [--codeSignIdentity=\"\"]'); + console.log(' [--codeSignResourceRules=\"\"]'); + console.log(' [--provisioningProfile=\"\"]'); + console.log(' --help : Displays this dialog.'); + console.log(' --debug : Builds project in debug mode. (Default)'); + console.log(' --release : Builds project in release mode.'); + console.log(' -r : Shortcut :: builds project in release mode.'); // TODO: add support for building different archs // console.log(" --archs : Builds project binaries for specific chip architectures (`anycpu`, `arm`, `x86`, `x64`)."); console.log(' --device, --simulator'); - console.log(' : Specifies, what type of project to build'); + console.log(' : Specifies, what type of project to build'); + console.log(' --codeSignIdentity : Type of signing identity used for code signing.'); + console.log(' --codeSignResourceRules : Path to ResourceRules.plist.'); + console.log(' --provisioningProfile : UUID of the profile.'); + console.log(''); console.log('examples:'); console.log(' build '); console.log(' build --debug'); console.log(' build --release'); + console.log(' build --codeSignIdentity="iPhone Distribution" --provisioningProfile="926c2bd6-8de9-4c2f-8407-1016d2d12954"'); // TODO: add support for building different archs // console.log(" build --release --archs=\"armv7\""); console.log(''); diff --git a/StoneIsland/platforms/ios/cordova/lib/check_reqs.js b/StoneIsland/platforms/ios/cordova/lib/check_reqs.js index 6b4cce56..d1f6333c 100755 --- a/StoneIsland/platforms/ios/cordova/lib/check_reqs.js +++ b/StoneIsland/platforms/ios/cordova/lib/check_reqs.js @@ -17,34 +17,30 @@ under the License. */ -/* jshint node:true, bitwise:true, undef:true, trailing:true, quotmark:true, - indent:4, unused:vars, latedef:nofunc, - sub:true, laxcomma:true, laxbreak:true -*/ - -var Q = require('Q'), - os = require('os'), +var Q = require('q'), shell = require('shelljs'), versions = require('./versions'); var XCODEBUILD_MIN_VERSION = '4.6.0'; +var XCODEBUILD_NOT_FOUND_MESSAGE = + 'Please install version ' + XCODEBUILD_MIN_VERSION + ' or greater from App Store'; var IOS_SIM_MIN_VERSION = '3.0.0'; -var IOS_SIM_NOT_FOUND_MESSAGE = 'ios-sim was not found. Please download, build and install version ' + IOS_SIM_MIN_VERSION + - ' or greater from https://github.com/phonegap/ios-sim into your path.' + - ' Or \'npm install -g ios-sim\' using node.js: http://nodejs.org'; +var IOS_SIM_NOT_FOUND_MESSAGE = + 'Please download, build and install version ' + IOS_SIM_MIN_VERSION + ' or greater' + + ' from https://github.com/phonegap/ios-sim into your path, or do \'npm install -g ios-sim\''; -var IOS_DEPLOY_MIN_VERSION = '1.2.0'; -var IOS_DEPLOY_NOT_FOUND_MESSAGE = 'ios-deploy was not found. Please download, build and install version ' + IOS_DEPLOY_MIN_VERSION + - ' or greater from https://github.com/phonegap/ios-deploy into your path.' + - ' Or \'npm install -g ios-deploy\' using node.js: http://nodejs.org'; +var IOS_DEPLOY_MIN_VERSION = '1.4.0'; +var IOS_DEPLOY_NOT_FOUND_MESSAGE = + 'Please download, build and install version ' + IOS_DEPLOY_MIN_VERSION + ' or greater' + + ' from https://github.com/phonegap/ios-deploy into your path, or do \'npm install -g ios-deploy\''; /** * Checks if xcode util is available * @return {Promise} Returns a promise either resolved with xcode version or rejected */ module.exports.run = module.exports.check_xcodebuild = function () { - return checkTool('xcodebuild', XCODEBUILD_MIN_VERSION); + return checkTool('xcodebuild', XCODEBUILD_MIN_VERSION, XCODEBUILD_NOT_FOUND_MESSAGE); }; /** @@ -63,6 +59,13 @@ module.exports.check_ios_sim = function () { return checkTool('ios-sim', IOS_SIM_MIN_VERSION, IOS_SIM_NOT_FOUND_MESSAGE); }; +module.exports.check_os = function () { + // Build iOS apps available for OSX platform only, so we reject on others platforms + return process.platform === 'darwin' ? + Q.resolve(process.platform) : + Q.reject('Cordova tooling for iOS requires Apple OS X'); +}; + module.exports.help = function () { console.log('Usage: check_reqs or node check_reqs'); }; @@ -71,24 +74,87 @@ module.exports.help = function () { * Checks if specific tool is available. * @param {String} tool Tool name to check. Known tools are 'xcodebuild', 'ios-sim' and 'ios-deploy' * @param {Number} minVersion Min allowed tool version. - * @param {String} optMessage Message that will be used to reject promise. + * @param {String} message Message that will be used to reject promise. * @return {Promise} Returns a promise either resolved with tool version or rejected */ -function checkTool (tool, minVersion, optMessage) { - if (os.platform() !== 'darwin'){ - // Build iOS apps available for OSX platform only, so we reject on others platforms - return Q.reject('Cordova tooling for iOS requires Apple OS X'); - } +function checkTool (tool, minVersion, message) { // Check whether tool command is available at all var tool_command = shell.which(tool); if (!tool_command) { - return Q.reject(optMessage || (tool + 'command is unavailable.')); + return Q.reject(tool + ' was not found. ' + (message || '')); } // check if tool version is greater than specified one return versions.get_tool_version(tool).then(function (version) { + version = version.trim(); return versions.compareVersions(version, minVersion) >= 0 ? Q.resolve(version) : Q.reject('Cordova needs ' + tool + ' version ' + minVersion + - ' or greater, you have version ' + version + '.'); + ' or greater, you have version ' + version + '. ' + (message || '')); }); } + +/** + * Object that represents one of requirements for current platform. + * @param {String} id The unique identifier for this requirements. + * @param {String} name The name of requirements. Human-readable field. + * @param {Boolean} isFatal Marks the requirement as fatal. If such requirement will fail + * next requirements' checks will be skipped. + */ +var Requirement = function (id, name, isFatal) { + this.id = id; + this.name = name; + this.installed = false; + this.metadata = {}; + this.isFatal = isFatal || false; +}; + +/** + * Methods that runs all checks one by one and returns a result of checks + * as an array of Requirement objects. This method intended to be used by cordova-lib check_reqs method + * + * @return Promise Array of requirements. Due to implementation, promise is always fulfilled. + */ +module.exports.check_all = function() { + + var requirements = [ + new Requirement('os', 'Apple OS X', true), + new Requirement('xcode', 'Xcode'), + new Requirement('ios-deploy', 'ios-deploy'), + new Requirement('ios-sim', 'ios-sim') + ]; + + var result = []; + var fatalIsHit = false; + + var checkFns = [ + module.exports.check_os, + module.exports.check_xcodebuild, + module.exports.check_ios_deploy, + module.exports.check_ios_sim + ]; + + // Then execute requirement checks one-by-one + return checkFns.reduce(function (promise, checkFn, idx) { + return promise.then(function () { + // If fatal requirement is failed, + // we don't need to check others + if (fatalIsHit) return Q(); + + var requirement = requirements[idx]; + return checkFn() + .then(function (version) { + requirement.installed = true; + requirement.metadata.version = version; + result.push(requirement); + }, function (err) { + if (requirement.isFatal) fatalIsHit = true; + requirement.metadata.reason = err; + result.push(requirement); + }); + }); + }, Q()) + .then(function () { + // When chain is completed, return requirements array to upstream API + return result; + }); +}; diff --git a/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js b/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js new file mode 100755 index 00000000..7a81b93e --- /dev/null +++ b/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.js @@ -0,0 +1,69 @@ +#!/usr/bin/env node + +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +// This script copies the www directory into the Xcode project. + +// This script should not be called directly. +// It is called as a build step from Xcode. + +var BUILT_PRODUCTS_DIR = process.env.BUILT_PRODUCTS_DIR, + FULL_PRODUCT_NAME = process.env.FULL_PRODUCT_NAME, + COPY_HIDDEN = process.env.COPY_HIDDEN, + PROJECT_FILE_PATH = process.env.PROJECT_FILE_PATH; + +var path = require('path'), + fs = require('fs'), + shell = require('shelljs'), + glob = require('glob'), + srcDir = 'www', + dstDir = path.join(BUILT_PRODUCTS_DIR, FULL_PRODUCT_NAME), + dstWwwDir = path.join(dstDir, 'www'); + +if(!BUILT_PRODUCTS_DIR) { + console.error('The script is meant to be run as an Xcode build step and relies on env variables set by Xcode.'); + process.exit(1); +} + +try { + fs.statSync(srcDir); +} catch (e) { + console.error('Path does not exist: ' + srcDir); + process.exit(1); +} + +// Code signing files must be removed or else there are +// resource signing errors. +shell.rm('-rf', dstWwwDir); +shell.rm('-rf', path.join(dstDir, '_CodeSignature')); +shell.rm('-rf', path.join(dstDir, 'PkgInfo')); +shell.rm('-rf', path.join(dstDir, 'embedded.mobileprovision')); + +// Copy www dir recursively +if(!!COPY_HIDDEN) { + shell.mkdir('-p', dstWwwDir); + shell.cp('-r', glob.sync(srcDir + '/**', { dot: true }), dstWwwDir); +} else { + shell.cp('-r', srcDir, dstDir); +} + +// Copy the config.xml file. +shell.cp('-f', path.join(path.dirname(PROJECT_FILE_PATH), path.basename(PROJECT_FILE_PATH, '.xcodeproj'), 'config.xml'), + dstDir); diff --git a/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.sh b/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.sh deleted file mode 100755 index 7b934d5f..00000000 --- a/StoneIsland/platforms/ios/cordova/lib/copy-www-build-step.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# -# -# This script copies the www directory into the Xcode project. -# -# This script should not be called directly. -# It is called as a build step from Xcode. - -SRC_DIR="www/" -DST_DIR="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/www" -COPY_HIDDEN= -ORIG_IFS=$IFS -IFS=$(echo -en "\n\b") - -if [[ -z "$BUILT_PRODUCTS_DIR" ]]; then - echo "The script is meant to be run as an Xcode build step and relies on env variables set by Xcode." - exit 1 -fi -if [[ ! -e "$SRC_DIR" ]]; then - echo "Path does not exist: $SRC_DIR" - exit 1 -fi - -# Use full path to find to avoid conflict with macports find (CB-6383). -if [[ -n $COPY_HIDDEN ]]; then - alias do_find='/usr/bin/find "$SRC_DIR"' -else - alias do_find='/usr/bin/find -L "$SRC_DIR" -name ".*" -prune -o' -fi - -time ( -# Code signing files must be removed or else there are -# resource signing errors. -rm -rf "$DST_DIR" \ - "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/_CodeSignature" \ - "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/PkgInfo" \ - "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME/embedded.mobileprovision" - -# Directories -for p in $(do_find -type d -print); do - subpath="${p#$SRC_DIR}" - mkdir "$DST_DIR$subpath" || exit 1 -done - -# Symlinks -for p in $(do_find -type l -print); do - subpath="${p#$SRC_DIR}" - source=$(readlink $SRC_DIR$subpath) - sourcetype=$(stat -f "%HT%SY" $source) - if [ "$sourcetype" = "Directory" ]; then - mkdir "$DST_DIR$subpath" || exit 2 - else - rsync -a "$source" "$DST_DIR$subpath" || exit 3 - fi -done - -# Files -for p in $(do_find -type f -print); do - subpath="${p#$SRC_DIR}" - if ! ln "$SRC_DIR$subpath" "$DST_DIR$subpath" 2>/dev/null; then - rsync -a "$SRC_DIR$subpath" "$DST_DIR$subpath" || exit 4 - fi -done - -# Copy the config.xml file. -cp -f "${PROJECT_FILE_PATH%.xcodeproj}/config.xml" "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" - -) -IFS=$ORIG_IFS - diff --git a/StoneIsland/platforms/ios/cordova/lib/list-devices b/StoneIsland/platforms/ios/cordova/lib/list-devices index a12abd74..3fa3e6da 100755 --- a/StoneIsland/platforms/ios/cordova/lib/list-devices +++ b/StoneIsland/platforms/ios/cordova/lib/list-devices @@ -21,7 +21,7 @@ /*jshint node: true*/ -var Q = require('Q'), +var Q = require('q'), exec = require('child_process').exec; /** @@ -36,14 +36,20 @@ function listDevices() { ]; // wrap al lexec calls into promises and wait until they're fullfilled - return Q.all(commands).then(function (promises) { + return Q.all(commands).then(function (results) { var accumulator = []; - promises.forEach(function (promise) { - if (promise.state === 'fulfilled') { - // Each command promise resolves with array [stout, stderr], and we need stdout only - // Append stdout lines to accumulator - accumulator.concat(promise.value[0].trim().split('\n')); - } + results.forEach(function (result) { + var devicefound; + // Each command promise resolves with array [stout, stderr], and we need stdout only + // Append stdout lines to accumulator + devicefound = result[0].trim().split('\n'); + if(devicefound && devicefound.length) { + devicefound.forEach(function(device) { + if (device) { + accumulator.push(device); + } + }); + } }); return accumulator; }); @@ -59,4 +65,4 @@ if (!module.parent) { console.log(device); }); }); -} +} \ No newline at end of file diff --git a/StoneIsland/platforms/ios/cordova/lib/list-emulator-images b/StoneIsland/platforms/ios/cordova/lib/list-emulator-images index 0c7f0c55..07dd1a48 100755 --- a/StoneIsland/platforms/ios/cordova/lib/list-emulator-images +++ b/StoneIsland/platforms/ios/cordova/lib/list-emulator-images @@ -32,8 +32,7 @@ var Q = require('q'), function listEmulatorImages () { return check_reqs.check_ios_sim().then(function () { return Q.nfcall(exec, 'ios-sim showdevicetypes 2>&1 | ' + - 'sed "s/com.apple.CoreSimulator.SimDeviceType.//g" | ' + - 'awk -F\',\' \'{print $1}\''); + 'sed "s/com.apple.CoreSimulator.SimDeviceType.//g"'); }).then(function (stdio) { // Exec promise resolves with array [stout, stderr], and we need stdout only return stdio[0].trim().split('\n'); diff --git a/StoneIsland/platforms/ios/cordova/lib/run.js b/StoneIsland/platforms/ios/cordova/lib/run.js index 151cad2a..fcd39015 100755 --- a/StoneIsland/platforms/ios/cordova/lib/run.js +++ b/StoneIsland/platforms/ios/cordova/lib/run.js @@ -50,7 +50,7 @@ module.exports.run = function (argv) { // Valid values for "--target" (case sensitive): var validTargets = ['iPhone-4s', 'iPhone-5', 'iPhone-5s', 'iPhone-6-Plus', 'iPhone-6', 'iPad-2', 'iPad-Retina', 'iPad-Air', 'Resizable-iPhone', 'Resizable-iPad']; - if (args.target && validTargets.indexOf(args.target) < 0 ) { + if (!(args.device) && args.target && validTargets.indexOf(args.target.split(',')[0]) < 0 ) { return Q.reject(args.target + ' is not a valid target for emulator'); } @@ -174,4 +174,4 @@ module.exports.help = function () { console.log(' run --emulator --debug'); console.log(''); process.exit(0); -}; \ No newline at end of file +}; diff --git a/StoneIsland/platforms/ios/cordova/version b/StoneIsland/platforms/ios/cordova/version index 075913e5..542a2173 100755 --- a/StoneIsland/platforms/ios/cordova/version +++ b/StoneIsland/platforms/ios/cordova/version @@ -25,6 +25,6 @@ Note: it does not work if the --shared option was used to create the project. */ -var VERSION="3.8.0" +var VERSION="3.9.2" console.log(VERSION); diff --git a/StoneIsland/platforms/ios/ios.json b/StoneIsland/platforms/ios/ios.json index 0ef21200..2058e26d 100644 --- a/StoneIsland/platforms/ios/ios.json +++ b/StoneIsland/platforms/ios/ios.json @@ -37,11 +37,11 @@ "count": 1 }, { - "xml": "", + "xml": "", "count": 1 }, { - "xml": "", + "xml": "", "count": 1 } ] @@ -49,21 +49,21 @@ }, "*-Info.plist": { "parents": { - "NSLocationWhenInUseUsageDescription": [ + "CFBundleURLTypes": [ { - "xml": "", + "xml": "CFBundleURLSchemesstoneisland", "count": 1 } ], - "UIBackgroundModes": [ + "NSLocationWhenInUseUsageDescription": [ { - "xml": "remote-notification", + "xml": "", "count": 1 } ], - "CFBundleURLTypes": [ + "UIBackgroundModes": [ { - "xml": "CFBundleURLSchemesstoneisland", + "xml": "remote-notification", "count": 1 } ] @@ -72,39 +72,39 @@ } }, "installed_plugins": { - "cordova-plugin-whitelist": { - "PACKAGE_NAME": "io.cordova.hellocordova" - }, "com.ionic.keyboard": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-console": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-customurlscheme": { + "URL_SCHEME": "stoneisland", + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-device": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-dialogs": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-geolocation": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-network-information": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-splashscreen": { - "PACKAGE_NAME": "io.cordova.hellocordova" - }, - "phonegap-plugin-push": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, - "cordova-plugin-customurlscheme": { - "URL_SCHEME": "stoneisland", - "PACKAGE_NAME": "io.cordova.hellocordova" + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-x-socialsharing": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "phonegap-plugin-push": { + "PACKAGE_NAME": "us.okfoc.stoneisland" } }, "dependent_plugins": {}, @@ -133,6 +133,14 @@ "console" ] }, + { + "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", + "id": "cordova-plugin-customurlscheme.LaunchMyApp", + "pluginId": "cordova-plugin-customurlscheme", + "clobbers": [ + "window.plugins.launchmyapp" + ] + }, { "file": "plugins/cordova-plugin-device/www/device.js", "id": "cordova-plugin-device.device", @@ -206,22 +214,6 @@ "navigator.splashscreen" ] }, - { - "file": "plugins/phonegap-plugin-push/www/push.js", - "id": "phonegap-plugin-push.PushNotification", - "pluginId": "phonegap-plugin-push", - "clobbers": [ - "PushNotification" - ] - }, - { - "file": "plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js", - "id": "cordova-plugin-customurlscheme.LaunchMyApp", - "pluginId": "cordova-plugin-customurlscheme", - "clobbers": [ - "window.plugins.launchmyapp" - ] - }, { "file": "plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js", "id": "cordova-plugin-x-socialsharing.SocialSharing", @@ -229,19 +221,27 @@ "clobbers": [ "window.plugins.socialsharing" ] + }, + { + "file": "plugins/phonegap-plugin-push/www/push.js", + "id": "phonegap-plugin-push.PushNotification", + "pluginId": "phonegap-plugin-push", + "clobbers": [ + "PushNotification" + ] } ], "plugin_metadata": { - "cordova-plugin-whitelist": "1.0.0", "com.ionic.keyboard": "1.0.4", "cordova-plugin-console": "1.0.1", + "cordova-plugin-customurlscheme": "4.0.0", "cordova-plugin-device": "1.0.1", "cordova-plugin-dialogs": "1.1.1", "cordova-plugin-geolocation": "1.0.1", "cordova-plugin-network-information": "1.0.1", "cordova-plugin-splashscreen": "2.1.0", - "phonegap-plugin-push": "1.4.4", - "cordova-plugin-customurlscheme": "4.0.0", - "cordova-plugin-x-socialsharing": "5.0.7" + "cordova-plugin-whitelist": "1.0.0", + "cordova-plugin-x-socialsharing": "5.0.7", + "phonegap-plugin-push": "1.4.4" } } \ No newline at end of file diff --git a/StoneIsland/platforms/ios/platform_www/cordova.js b/StoneIsland/platforms/ios/platform_www/cordova.js index 4f781077..46ab90b7 100644 --- a/StoneIsland/platforms/ios/platform_www/cordova.js +++ b/StoneIsland/platforms/ios/platform_www/cordova.js @@ -1,5 +1,5 @@ // Platform: ios -// fc4db9145934bd0053161cbf9ffc0caf83b770c6 +// 49a8db57fa070d20ea7b304a53ffec3d7250c5af /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '3.8.0'; +var PLATFORM_VERSION_BUILD_LABEL = '3.9.2'; // file: src/scripts/require.js /*jshint -W079 */ @@ -101,10 +101,17 @@ if (typeof module === "object" && typeof require === "function") { // file: src/cordova.js define("cordova", function(require, exports, module) { +// Workaround for Windows 10 in hosted environment case +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object +if (window.cordova && !(window.cordova instanceof HTMLElement)) { + throw new Error("cordova already defined"); +} + var channel = require('cordova/channel'); var platform = require('cordova/platform'); + /** * Intercept calls to addEventListener + removeEventListener and handle deviceready, * resume, and pause events. @@ -326,7 +333,6 @@ module.exports = cordova; // file: src/common/argscheck.js define("cordova/argscheck", function(require, exports, module) { -var exec = require('cordova/exec'); var utils = require('cordova/utils'); var moduleExports = module.exports; @@ -811,7 +817,7 @@ module.exports = channel; }); -// file: src/ios/exec.js +// file: e:/cordova/cordova-ios/cordova-js-src/exec.js define("cordova/exec", function(require, exports, module) { /** @@ -1220,6 +1226,7 @@ if (!window.console.warn) { // Register pause, resume and deviceready channels as events on document. channel.onPause = cordova.addDocumentEventHandler('pause'); channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); // Listen for DOMContentLoaded and notify our channel subscribers. @@ -1281,10 +1288,12 @@ define("cordova/init_b", function(require, exports, module) { var channel = require('cordova/channel'); var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); var utils = require('cordova/utils'); -var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady]; +var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady, channel.onPluginsReady]; // setting exec cordova.exec = require('cordova/exec'); @@ -1347,6 +1356,7 @@ if (!window.console.warn) { // Register pause, resume and deviceready channels as events on document. channel.onPause = cordova.addDocumentEventHandler('pause'); channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); // Listen for DOMContentLoaded and notify our channel subscribers. @@ -1368,10 +1378,19 @@ if (window._nativeReady) { // Call the platform-specific initialization. platform.bootstrap && platform.bootstrap(); +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function() { + pluginloader.load(function() { + channel.onPluginsReady.fire(); + }); +}, 0); + /** * Create all cordova objects once native side is ready. */ channel.join(function() { + modulemapper.mapModules(window); platform.initialize && platform.initialize(); @@ -1490,7 +1509,104 @@ exports.reset(); }); -// file: src/ios/platform.js +// file: src/common/modulemapper_b.js +define("cordova/modulemapper_b", function(require, exports, module) { + +var builder = require('cordova/builder'), + symbolList = [], + deprecationMap; + +exports.reset = function() { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) { + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function(moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace(symbolPath, context) { + if (!symbolPath) { + return context; + } + var parts = symbolPath.split('.'); + var cur = context; + for (var i = 0, part; part = parts[i]; ++i) { + cur = cur[part] = cur[part] || {}; + } + return cur; +} + +exports.mapModules = function(context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: e:/cordova/cordova-ios/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { module.exports = { @@ -1613,6 +1729,54 @@ exports.load = function(callback) { }; +}); + +// file: src/common/pluginloader_b.js +define("cordova/pluginloader_b", function(require, exports, module) { + +var modulemapper = require('cordova/modulemapper'); + +// Handler for the cordova_plugins.js content. +// See plugman's plugin_loader.js for the details of this object. +function handlePluginsObject(moduleList) { + // if moduleList is not defined or empty, we've nothing to do + if (!moduleList || !moduleList.length) { + return; + } + + // Loop through all the modules and then through their clobbers and merges. + for (var i = 0, module; module = moduleList[i]; i++) { + if (module.clobbers && module.clobbers.length) { + for (var j = 0; j < module.clobbers.length; j++) { + modulemapper.clobbers(module.id, module.clobbers[j]); + } + } + + if (module.merges && module.merges.length) { + for (var k = 0; k < module.merges.length; k++) { + modulemapper.merges(module.id, module.merges[k]); + } + } + + // Finally, if runs is truthy we want to simply require() the module. + if (module.runs) { + modulemapper.runs(module.id); + } + } +} + +// Loads all plugins' js-modules. Plugin loading is syncronous in browserified bundle +// but the method accepts callback to be compatible with non-browserify flow. +// onDeviceReady is blocked on onPluginsReady. onPluginsReady is fired when there are +// no plugins to load, or they are all done. +exports.load = function(callback) { + var moduleList = require("cordova/plugin_list"); + handlePluginsObject(moduleList); + + callback(); +}; + + }); // file: src/common/urlutil.js @@ -1694,15 +1858,14 @@ utils.typeName = function(val) { /** * Returns an indication of whether the argument is an array or not */ -utils.isArray = function(a) { - return utils.typeName(a) == 'Array'; -}; +utils.isArray = Array.isArray || + function(a) {return utils.typeName(a) == 'Array';}; /** * Returns an indication of whether the argument is a Date or not */ utils.isDate = function(d) { - return utils.typeName(d) == 'Date'; + return (d instanceof Date); }; /** @@ -1736,17 +1899,25 @@ utils.clone = function(obj) { * Returns a wrapped version of the function */ utils.close = function(context, func, params) { - if (typeof params == 'undefined') { - return function() { - return func.apply(context, arguments); - }; - } else { - return function() { - return func.apply(context, params); - }; - } + return function() { + var args = params || arguments; + return func.apply(context, args); + }; }; +//------------------------------------------------------------------------------ +function UUIDcreatePart(length) { + var uuidpart = ""; + for (var i=0; i + if (strategy == 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy == 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy == 'd' && !target) || (strategy != 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function(context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + + +}); + +// file: e:/cordova/cordova-ios/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { module.exports = { @@ -1613,6 +1729,54 @@ exports.load = function(callback) { }; +}); + +// file: src/common/pluginloader_b.js +define("cordova/pluginloader_b", function(require, exports, module) { + +var modulemapper = require('cordova/modulemapper'); + +// Handler for the cordova_plugins.js content. +// See plugman's plugin_loader.js for the details of this object. +function handlePluginsObject(moduleList) { + // if moduleList is not defined or empty, we've nothing to do + if (!moduleList || !moduleList.length) { + return; + } + + // Loop through all the modules and then through their clobbers and merges. + for (var i = 0, module; module = moduleList[i]; i++) { + if (module.clobbers && module.clobbers.length) { + for (var j = 0; j < module.clobbers.length; j++) { + modulemapper.clobbers(module.id, module.clobbers[j]); + } + } + + if (module.merges && module.merges.length) { + for (var k = 0; k < module.merges.length; k++) { + modulemapper.merges(module.id, module.merges[k]); + } + } + + // Finally, if runs is truthy we want to simply require() the module. + if (module.runs) { + modulemapper.runs(module.id); + } + } +} + +// Loads all plugins' js-modules. Plugin loading is syncronous in browserified bundle +// but the method accepts callback to be compatible with non-browserify flow. +// onDeviceReady is blocked on onPluginsReady. onPluginsReady is fired when there are +// no plugins to load, or they are all done. +exports.load = function(callback) { + var moduleList = require("cordova/plugin_list"); + handlePluginsObject(moduleList); + + callback(); +}; + + }); // file: src/common/urlutil.js @@ -1694,15 +1858,14 @@ utils.typeName = function(val) { /** * Returns an indication of whether the argument is an array or not */ -utils.isArray = function(a) { - return utils.typeName(a) == 'Array'; -}; +utils.isArray = Array.isArray || + function(a) {return utils.typeName(a) == 'Array';}; /** * Returns an indication of whether the argument is a Date or not */ utils.isDate = function(d) { - return utils.typeName(d) == 'Date'; + return (d instanceof Date); }; /** @@ -1736,17 +1899,25 @@ utils.clone = function(obj) { * Returns a wrapped version of the function */ utils.close = function(context, func, params) { - if (typeof params == 'undefined') { - return function() { - return func.apply(context, arguments); - }; - } else { - return function() { - return func.apply(context, params); - }; - } + return function() { + var args = params || arguments; + return func.apply(context, args); + }; }; +//------------------------------------------------------------------------------ +function UUIDcreatePart(length) { + var uuidpart = ""; + for (var i=0; i 0){ - formatArgs.unshift(fmtString); // add formatString - } - - var message = logger.format.apply(logger.format, formatArgs); - - if (LevelsMap[level] === null) { - throw new Error("invalid logging level: " + level); - } - - if (LevelsMap[level] > CurrentLevel) return; - - // queue the message if not yet at deviceready - if (!DeviceReady && !UseConsole) { - Queued.push([level, message]); - return; - } - - // Log using the native logger if that is enabled - if (UseLogger) { - exec(null, null, "Console", "logLevel", [level, message]); - } - - // Log using the console if that is enabled - if (UseConsole) { - // make sure console is not using logger - if (console.useLogger()) { - throw new Error("console and logger are too intertwingly"); - } - - // log to the console - switch (level) { - case logger.LOG: originalConsole.log(message); break; - case logger.ERROR: originalConsole.log("ERROR: " + message); break; - case logger.WARN: originalConsole.log("WARN: " + message); break; - case logger.INFO: originalConsole.log("INFO: " + message); break; - case logger.DEBUG: originalConsole.log("DEBUG: " + message); break; - } - } -}; - - -/** - * Formats a string and arguments following it ala console.log() - * - * Any remaining arguments will be appended to the formatted string. - * - * for rationale, see FireBug's Console API: - * http://getfirebug.com/wiki/index.php/Console_API - */ -logger.format = function(formatString, args) { - return __format(arguments[0], [].slice.call(arguments,1)).join(' '); -}; - - -//------------------------------------------------------------------------------ -/** - * Formats a string and arguments following it ala vsprintf() - * - * format chars: - * %j - format arg as JSON - * %o - format arg as JSON - * %c - format arg as '' - * %% - replace with '%' - * any other char following % will format it's - * arg via toString(). - * - * Returns an array containing the formatted string and any remaining - * arguments. - */ -function __format(formatString, args) { - if (formatString === null || formatString === undefined) return [""]; - if (arguments.length == 1) return [formatString.toString()]; - - if (typeof formatString != "string") - formatString = formatString.toString(); - - var pattern = /(.*?)%(.)(.*)/; - var rest = formatString; - var result = []; - - while (args.length) { - var match = pattern.exec(rest); - if (!match) break; - - var arg = args.shift(); - rest = match[3]; - result.push(match[1]); - - if (match[2] == '%') { - result.push('%'); - args.unshift(arg); - continue; - } - - result.push(__formatted(arg, match[2])); - } - - result.push(rest); - - var remainingArgs = [].slice.call(args); - remainingArgs.unshift(result.join('')); - return remainingArgs; -} - -function __formatted(object, formatChar) { - - try { - switch(formatChar) { - case 'j': - case 'o': return JSON.stringify(object); - case 'c': return ''; - } - } - catch (e) { - return "error JSON.stringify()ing argument: " + e; - } - - if ((object === null) || (object === undefined)) { - return Object.prototype.toString.call(object); - } - - return object.toString(); -} - - -//------------------------------------------------------------------------------ -// when deviceready fires, log queued messages -logger.__onDeviceReady = function() { - if (DeviceReady) return; - - DeviceReady = true; - - for (var i=0; i 0) { - opt.maximumAge = options.maximumAge; - } - if (options.enableHighAccuracy !== undefined) { - opt.enableHighAccuracy = options.enableHighAccuracy; - } - if (options.timeout !== undefined && !isNaN(options.timeout)) { - if (options.timeout < 0) { - opt.timeout = 0; - } else { - opt.timeout = options.timeout; - } - } - } - - return opt; -} - -// Returns a timeout failure, closed over a specified timeout value and error callback. -function createTimeout(errorCallback, timeout) { - var t = setTimeout(function() { - clearTimeout(t); - t = null; - errorCallback({ - code:PositionError.TIMEOUT, - message:"Position retrieval timed out." - }); - }, timeout); - return t; -} - -var geolocation = { - lastPosition:null, // reference to last known (cached) position returned - /** - * Asynchronously acquires the current position. - * - * @param {Function} successCallback The function to call when the position data is available - * @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL) - * @param {PositionOptions} options The options for getting the position data. (OPTIONAL) - */ - getCurrentPosition:function(successCallback, errorCallback, options) { - argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments); - options = parseParameters(options); - - // Timer var that will fire an error callback if no position is retrieved from native - // before the "timeout" param provided expires - var timeoutTimer = {timer:null}; - - var win = function(p) { - clearTimeout(timeoutTimer.timer); - if (!(timeoutTimer.timer)) { - // Timeout already happened, or native fired error callback for - // this geo request. - // Don't continue with success callback. - return; - } - var pos = new Position( - { - latitude:p.latitude, - longitude:p.longitude, - altitude:p.altitude, - accuracy:p.accuracy, - heading:p.heading, - velocity:p.velocity, - altitudeAccuracy:p.altitudeAccuracy - }, - (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp))) - ); - geolocation.lastPosition = pos; - successCallback(pos); - }; - var fail = function(e) { - clearTimeout(timeoutTimer.timer); - timeoutTimer.timer = null; - var err = new PositionError(e.code, e.message); - if (errorCallback) { - errorCallback(err); - } - }; - - // Check our cached position, if its timestamp difference with current time is less than the maximumAge, then just - // fire the success callback with the cached position. - if (geolocation.lastPosition && options.maximumAge && (((new Date()).getTime() - geolocation.lastPosition.timestamp.getTime()) <= options.maximumAge)) { - successCallback(geolocation.lastPosition); - // If the cached position check failed and the timeout was set to 0, error out with a TIMEOUT error object. - } else if (options.timeout === 0) { - fail({ - code:PositionError.TIMEOUT, - message:"timeout value in PositionOptions set to 0 and no cached Position object available, or cached Position object's age exceeds provided PositionOptions' maximumAge parameter." - }); - // Otherwise we have to call into native to retrieve a position. - } else { - if (options.timeout !== Infinity) { - // If the timeout value was not set to Infinity (default), then - // set up a timeout function that will fire the error callback - // if no successful position was retrieved before timeout expired. - timeoutTimer.timer = createTimeout(fail, options.timeout); - } else { - // This is here so the check in the win function doesn't mess stuff up - // may seem weird but this guarantees timeoutTimer is - // always truthy before we call into native - timeoutTimer.timer = true; - } - exec(win, fail, "Geolocation", "getLocation", [options.enableHighAccuracy, options.maximumAge]); - } - return timeoutTimer; - }, - /** - * Asynchronously watches the geolocation for changes to geolocation. When a change occurs, - * the successCallback is called with the new location. - * - * @param {Function} successCallback The function to call each time the location data is available - * @param {Function} errorCallback The function to call when there is an error getting the location data. (OPTIONAL) - * @param {PositionOptions} options The options for getting the location data such as frequency. (OPTIONAL) - * @return String The watch id that must be passed to #clearWatch to stop watching. - */ - watchPosition:function(successCallback, errorCallback, options) { - argscheck.checkArgs('fFO', 'geolocation.getCurrentPosition', arguments); - options = parseParameters(options); - - var id = utils.createUUID(); - - // Tell device to get a position ASAP, and also retrieve a reference to the timeout timer generated in getCurrentPosition - timers[id] = geolocation.getCurrentPosition(successCallback, errorCallback, options); - - var fail = function(e) { - clearTimeout(timers[id].timer); - var err = new PositionError(e.code, e.message); - if (errorCallback) { - errorCallback(err); - } - }; - - var win = function(p) { - clearTimeout(timers[id].timer); - if (options.timeout !== Infinity) { - timers[id].timer = createTimeout(fail, options.timeout); - } - var pos = new Position( - { - latitude:p.latitude, - longitude:p.longitude, - altitude:p.altitude, - accuracy:p.accuracy, - heading:p.heading, - velocity:p.velocity, - altitudeAccuracy:p.altitudeAccuracy - }, - (p.timestamp === undefined ? new Date() : ((p.timestamp instanceof Date) ? p.timestamp : new Date(p.timestamp))) - ); - geolocation.lastPosition = pos; - successCallback(pos); - }; - - exec(win, fail, "Geolocation", "addWatch", [id, options.enableHighAccuracy]); - - return id; - }, - /** - * Clears the specified heading watch. - * - * @param {String} id The ID of the watch returned from #watchPosition - */ - clearWatch:function(id) { - if (id && timers[id] !== undefined) { - clearTimeout(timers[id].timer); - timers[id].timer = false; - exec(null, null, "Geolocation", "clearWatch", [id]); - } - } -}; - -module.exports = geolocation; - -}); diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js deleted file mode 100644 index 1450e953..00000000 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/Connection.js +++ /dev/null @@ -1,36 +0,0 @@ -cordova.define("cordova-plugin-network-information.Connection", function(require, exports, module) { /* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -/** - * Network status - */ -module.exports = { - UNKNOWN: "unknown", - ETHERNET: "ethernet", - WIFI: "wifi", - CELL_2G: "2g", - CELL_3G: "3g", - CELL_4G: "4g", - CELL:"cellular", - NONE: "none" -}; - -}); diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js deleted file mode 100644 index bfac2e3f..00000000 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-network-information/www/network.js +++ /dev/null @@ -1,93 +0,0 @@ -cordova.define("cordova-plugin-network-information.network", function(require, exports, module) { /* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'), - cordova = require('cordova'), - channel = require('cordova/channel'), - utils = require('cordova/utils'); - -// Link the onLine property with the Cordova-supplied network info. -// This works because we clobber the navigator object with our own -// object in bootstrap.js. -// Browser platform do not need to define this property, because -// it is already supported by modern browsers -if (cordova.platformId !== 'browser' && typeof navigator != 'undefined') { - utils.defineGetter(navigator, 'onLine', function() { - return this.connection.type != 'none'; - }); -} - -function NetworkConnection() { - this.type = 'unknown'; -} - -/** - * Get connection info - * - * @param {Function} successCallback The function to call when the Connection data is available - * @param {Function} errorCallback The function to call when there is an error getting the Connection data. (OPTIONAL) - */ -NetworkConnection.prototype.getInfo = function(successCallback, errorCallback) { - exec(successCallback, errorCallback, "NetworkStatus", "getConnectionInfo", []); -}; - -var me = new NetworkConnection(); -var timerId = null; -var timeout = 500; - -channel.createSticky('onCordovaConnectionReady'); -channel.waitForInitialization('onCordovaConnectionReady'); - -channel.onCordovaReady.subscribe(function() { - me.getInfo(function(info) { - me.type = info; - if (info === "none") { - // set a timer if still offline at the end of timer send the offline event - timerId = setTimeout(function(){ - cordova.fireDocumentEvent("offline"); - timerId = null; - }, timeout); - } else { - // If there is a current offline event pending clear it - if (timerId !== null) { - clearTimeout(timerId); - timerId = null; - } - cordova.fireDocumentEvent("online"); - } - - // should only fire this once - if (channel.onCordovaConnectionReady.state !== 2) { - channel.onCordovaConnectionReady.fire(); - } - }, - function (e) { - // If we can't get the network info we should still tell Cordova - // to fire the deviceready event. - if (channel.onCordovaConnectionReady.state !== 2) { - channel.onCordovaConnectionReady.fire(); - } - console.log("Error initializing Network Connection: " + e); - }); -}); - -module.exports = me; - -}); diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js deleted file mode 100644 index 0e6a10af..00000000 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-splashscreen/www/splashscreen.js +++ /dev/null @@ -1,35 +0,0 @@ -cordova.define("cordova-plugin-splashscreen.SplashScreen", function(require, exports, module) { /* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * -*/ - -var exec = require('cordova/exec'); - -var splashscreen = { - show:function() { - exec(null, null, "SplashScreen", "show", []); - }, - hide:function() { - exec(null, null, "SplashScreen", "hide", []); - } -}; - -module.exports = splashscreen; - -}); diff --git a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js b/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js deleted file mode 100644 index aa82acf6..00000000 --- a/StoneIsland/platforms/ios/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js +++ /dev/null @@ -1,117 +0,0 @@ -cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { var cordova = require('cordova'); - -function SocialSharing() { -} - -// Override this method (after deviceready) to set the location where you want the iPad popup arrow to appear. -// If not overridden with different values, the popup is not used. Example: -// -// window.plugins.socialsharing.iPadPopupCoordinates = function() { -// return "100,100,200,300"; -// }; -SocialSharing.prototype.iPadPopupCoordinates = function () { - // left,top,width,height - return "-1,-1,-1,-1"; -}; - -SocialSharing.prototype.setIPadPopupCoordinates = function (coords) { - // left,top,width,height - cordova.exec(function() {}, this._getErrorCallback(function() {}, "setIPadPopupCoordinates"), "SocialSharing", "setIPadPopupCoordinates", [coords]); -}; - -SocialSharing.prototype.available = function (callback) { - cordova.exec(function (avail) { - callback(avail ? true : false); - }, null, "SocialSharing", "available", []); -}; - -SocialSharing.prototype.share = function (message, subject, fileOrFileArray, url, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SocialSharing", "share", [message, subject, this._asArray(fileOrFileArray), url]); -}; - -SocialSharing.prototype.shareViaTwitter = function (message, file /* multiple not allowed by twitter */, url, successCallback, errorCallback) { - var fileArray = this._asArray(file); - var ecb = this._getErrorCallback(errorCallback, "shareViaTwitter"); - if (fileArray.length > 1) { - ecb("shareViaTwitter supports max one file"); - } else { - cordova.exec(successCallback, ecb, "SocialSharing", "shareViaTwitter", [message, null, fileArray, url]); - } -}; - -SocialSharing.prototype.shareViaFacebook = function (message, fileOrFileArray, url, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaFacebook"), "SocialSharing", "shareViaFacebook", [message, null, this._asArray(fileOrFileArray), url]); -}; - -SocialSharing.prototype.shareViaFacebookWithPasteMessageHint = function (message, fileOrFileArray, url, pasteMessageHint, successCallback, errorCallback) { - pasteMessageHint = pasteMessageHint || "If you like you can paste a message from your clipboard"; - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaFacebookWithPasteMessageHint"), "SocialSharing", "shareViaFacebookWithPasteMessageHint", [message, null, this._asArray(fileOrFileArray), url, pasteMessageHint]); -}; - -SocialSharing.prototype.shareViaWhatsApp = function (message, fileOrFileArray, url, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url]); -}; - -SocialSharing.prototype.shareViaSMS = function (options, phonenumbers, successCallback, errorCallback) { - var opts = options; - if (typeof options == "string") { - opts = {"message":options}; // for backward compatibility as the options param used to be the message - } - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaSMS"), "SocialSharing", "shareViaSMS", [opts, phonenumbers]); -}; - -SocialSharing.prototype.shareViaEmail = function (message, subject, toArray, ccArray, bccArray, fileOrFileArray, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaEmail"), "SocialSharing", "shareViaEmail", [message, subject, this._asArray(toArray), this._asArray(ccArray), this._asArray(bccArray), this._asArray(fileOrFileArray)]); -}; - -SocialSharing.prototype.canShareVia = function (via, message, subject, fileOrFileArray, url, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "canShareVia"), "SocialSharing", "canShareVia", [message, subject, this._asArray(fileOrFileArray), url, via]); -}; - -SocialSharing.prototype.canShareViaEmail = function (successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "canShareViaEmail"), "SocialSharing", "canShareViaEmail", []); -}; - -SocialSharing.prototype.shareViaInstagram = function (message, fileOrFileArray, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaInstagram"), "SocialSharing", "shareViaInstagram", [message, null, this._asArray(fileOrFileArray), null]); -}; - -SocialSharing.prototype.shareVia = function (via, message, subject, fileOrFileArray, url, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareVia"), "SocialSharing", "shareVia", [message, subject, this._asArray(fileOrFileArray), url, via]); -}; - -SocialSharing.prototype.saveToPhotoAlbum = function (fileOrFileArray, successCallback, errorCallback) { - cordova.exec(successCallback, this._getErrorCallback(errorCallback, "saveToPhotoAlbum"), "SocialSharing", "saveToPhotoAlbum", [this._asArray(fileOrFileArray)]); -}; - -SocialSharing.prototype._asArray = function (param) { - if (param == null) { - param = []; - } else if (typeof param === 'string') { - param = new Array(param); - } - return param; -}; - -SocialSharing.prototype._getErrorCallback = function (ecb, functionName) { - if (typeof ecb === 'function') { - return ecb; - } else { - return function (result) { - console.log("The injected error callback of '" + functionName + "' received: " + JSON.stringify(result)); - } - } -}; - -SocialSharing.install = function () { - if (!window.plugins) { - window.plugins = {}; - } - - window.plugins.socialsharing = new SocialSharing(); - return window.plugins.socialsharing; -}; - -cordova.addConstructor(SocialSharing.install); - -}); diff --git a/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js b/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js deleted file mode 100644 index 7aa30fd7..00000000 --- a/StoneIsland/platforms/ios/www/plugins/phonegap-plugin-push/www/push.js +++ /dev/null @@ -1,231 +0,0 @@ -cordova.define("phonegap-plugin-push.PushNotification", function(require, exports, module) { /* global cordova:false */ - -/*! - * Module dependencies. - */ - -var exec = cordova.require('cordova/exec'); - -/** - * PushNotification constructor. - * - * @param {Object} options to initiate Push Notifications. - * @return {PushNotification} instance that can be monitored and cancelled. - */ - -var PushNotification = function(options) { - this._handlers = { - 'registration': [], - 'notification': [], - 'error': [] - }; - - // require options parameter - if (typeof options === 'undefined') { - throw new Error('The options argument is required.'); - } - - // store the options to this object instance - this.options = options; - - // triggered on registration and notification - var that = this; - var success = function(result) { - if (result && typeof result.registrationId !== 'undefined') { - that.emit('registration', result); - } else if (result && typeof result.callback !== 'undefined') { - var executeFunctionByName = function(functionName, context /*, args */) { - var args = Array.prototype.slice.call(arguments, 2); - var namespaces = functionName.split("."); - var func = namespaces.pop(); - for (var i = 0; i < namespaces.length; i++) { - context = context[namespaces[i]]; - } - return context[func].apply(context, args); - } - - executeFunctionByName(result.callback, window, result); - } else if (result) { - that.emit('notification', result); - } - }; - - // triggered on error - var fail = function(msg) { - var e = (typeof msg === 'string') ? new Error(msg) : msg; - that.emit('error', e); - }; - - // wait at least one process tick to allow event subscriptions - setTimeout(function() { - exec(success, fail, 'PushNotification', 'init', [options]); - }, 10); -}; - -/** - * Unregister from push notifications - */ - -PushNotification.prototype.unregister = function(successCallback, errorCallback, options) { - if (errorCallback == null) { errorCallback = function() {}} - - if (typeof errorCallback != "function") { - console.log("PushNotification.unregister failure: failure parameter not a function"); - return - } - - if (typeof successCallback != "function") { - console.log("PushNotification.unregister failure: success callback parameter must be a function"); - return - } - - exec(successCallback, errorCallback, "PushNotification", "unregister", [options]); -}; - -/** - * Call this to set the application icon badge - */ - -PushNotification.prototype.setApplicationIconBadgeNumber = function(successCallback, errorCallback, badge) { - if (errorCallback == null) { errorCallback = function() {}} - - if (typeof errorCallback != "function") { - console.log("PushNotification.setApplicationIconBadgeNumber failure: failure parameter not a function"); - return - } - - if (typeof successCallback != "function") { - console.log("PushNotification.setApplicationIconBadgeNumber failure: success callback parameter must be a function"); - return - } - - exec(successCallback, errorCallback, "PushNotification", "setApplicationIconBadgeNumber", [{badge: badge}]); -}; - -/** - * Get the application icon badge - */ - -PushNotification.prototype.getApplicationIconBadgeNumber = function(successCallback, errorCallback) { - if (errorCallback == null) { errorCallback = function() {}} - - if (typeof errorCallback != "function") { - console.log("PushNotification.getApplicationIconBadgeNumber failure: failure parameter not a function"); - return - } - - if (typeof successCallback != "function") { - console.log("PushNotification.getApplicationIconBadgeNumber failure: success callback parameter must be a function"); - return - } - - exec(successCallback, errorCallback, "PushNotification", "getApplicationIconBadgeNumber", []); -}; - -/** - * Listen for an event. - * - * The following events are supported: - * - * - registration - * - notification - * - error - * - * @param {String} eventName to subscribe to. - * @param {Function} callback triggered on the event. - */ - -PushNotification.prototype.on = function(eventName, callback) { - if (this._handlers.hasOwnProperty(eventName)) { - this._handlers[eventName].push(callback); - } -}; - -/** - * Remove event listener. - * - * @param {String} eventName to match subscription. - * @param {Function} handle function associated with event. - */ - -PushNotification.prototype.off = function (eventName, handle) { - if (this._handlers.hasOwnProperty(eventName)) { - var handleIndex = this._handlers[eventName].indexOf(handle); - if (handleIndex >= 0) - this._handlers[eventName].splice(handleIndex, 1); - } -}; - -/** - * Emit an event. - * - * This is intended for internal use only. - * - * @param {String} eventName is the event to trigger. - * @param {*} all arguments are passed to the event listeners. - * - * @return {Boolean} is true when the event is triggered otherwise false. - */ - -PushNotification.prototype.emit = function() { - var args = Array.prototype.slice.call(arguments); - var eventName = args.shift(); - - if (!this._handlers.hasOwnProperty(eventName)) { - return false; - } - - for (var i = 0, length = this._handlers[eventName].length; i < length; i++) { - this._handlers[eventName][i].apply(undefined,args); - } - - return true; -}; - -PushNotification.prototype.finish = function(successCallback, errorCallback) { - if (successCallback == null) { successCallback = function() {}} - if (errorCallback == null) { errorCallback = function() {}} - - if (typeof successCallback != "function") { - console.log("finish failure: success callback parameter must be a function"); - return - } - - if (typeof errorCallback != "function") { - console.log("finish failure: failure parameter not a function"); - return - } - - exec(successCallback, errorCallback, 'PushNotification', 'finish', []); -} - -/*! - * Push Notification Plugin. - */ - -module.exports = { - /** - * Register for Push Notifications. - * - * This method will instantiate a new copy of the PushNotification object - * and start the registration process. - * - * @param {Object} options - * @return {PushNotification} instance - */ - - init: function(options) { - return new PushNotification(options); - }, - - /** - * PushNotification Object. - * - * Expose the PushNotification object for direct use - * and testing. Typically, you should use the - * .init helper method. - */ - - PushNotification: PushNotification -}; -}); diff --git a/StoneIsland/platforms/platforms.json b/StoneIsland/platforms/platforms.json index f0acd064..bca94e46 100644 --- a/StoneIsland/platforms/platforms.json +++ b/StoneIsland/platforms/platforms.json @@ -1,3 +1,3 @@ { - "ios": "3.8.0" + "ios": "3.9.2" } \ No newline at end of file diff --git a/StoneIsland/plugins/ios.json b/StoneIsland/plugins/ios.json index 77cd0086..bd4d076d 100644 --- a/StoneIsland/plugins/ios.json +++ b/StoneIsland/plugins/ios.json @@ -4,147 +4,42 @@ "uninstalled": [] }, "config_munge": { - "files": { - "config.xml": { - "parents": { - "/*": [ - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - }, - { - "xml": "", - "count": 1 - } - ] - } - }, - "framework": { - "parents": { - "AudioToolbox.framework": [ - { - "xml": true, - "count": 1 - } - ], - "CoreLocation.framework": [ - { - "xml": false, - "count": 1 - } - ], - "SystemConfiguration.framework": [ - { - "xml": true, - "count": 1 - } - ], - "CoreGraphics.framework": [ - { - "xml": false, - "count": 1 - } - ], - "Social.framework": [ - { - "xml": true, - "count": 1 - } - ], - "MessageUI.framework": [ - { - "xml": true, - "count": 1 - } - ] - } - }, - "*-Info.plist": { - "parents": { - "NSLocationWhenInUseUsageDescription": [ - { - "xml": "", - "count": 1 - } - ], - "UIBackgroundModes": [ - { - "xml": "remote-notification", - "count": 1 - } - ], - "CFBundleURLTypes": [ - { - "xml": "CFBundleURLSchemesstoneisland", - "count": 1 - } - ] - } - } - } + "files": {} }, "installed_plugins": { - "cordova-plugin-whitelist": { - "PACKAGE_NAME": "io.cordova.hellocordova" - }, "com.ionic.keyboard": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-console": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "cordova-plugin-customurlscheme": { + "URL_SCHEME": "stoneisland", + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-device": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-dialogs": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-geolocation": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-network-information": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-splashscreen": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" }, - "phonegap-plugin-push": { - "PACKAGE_NAME": "io.cordova.hellocordova" - }, - "cordova-plugin-customurlscheme": { - "URL_SCHEME": "stoneisland", - "PACKAGE_NAME": "io.cordova.hellocordova" + "cordova-plugin-whitelist": { + "PACKAGE_NAME": "us.okfoc.stoneisland" }, "cordova-plugin-x-socialsharing": { - "PACKAGE_NAME": "io.cordova.hellocordova" + "PACKAGE_NAME": "us.okfoc.stoneisland" + }, + "phonegap-plugin-push": { + "PACKAGE_NAME": "us.okfoc.stoneisland" } }, "dependent_plugins": {} -- cgit v1.2.3-70-g09d2