rhodes 5.5.2 → 5.5.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +1 -1
- data/CREDITS +3 -3
- data/LICENSE +1 -1
- data/README.html +1 -1
- data/Rakefile +53 -14
- data/bin/get-rhodes-info +0 -0
- data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/Rakefile +1 -1
- data/lib/build/jake.rb +11 -0
- data/lib/commonAPI/barcode/ext/platform/iphone/impl/BarcodeFactory.m +2 -1
- data/lib/commonAPI/coreapi/ext/NativeTabbar.xml +4 -0
- data/lib/commonAPI/coreapi/ext/platform/iphone/cpp_based_impl/SystemImpl.mm +1 -0
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NativeTabbarSingleton.m +7 -2
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NativeToolbarSingleton.m +6 -2
- data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NavbarSingleton.m +8 -2
- data/lib/commonAPI/coreapi/ext/shared/ApplicationImpl.cpp +3 -0
- data/lib/commonAPI/coreapi/ext/shared/NetworkImpl.cpp +1 -0
- data/lib/commonAPI/coreapi/ext/shared/TimerImpl.cpp +36 -27
- data/lib/commonAPI/coreapi/public/api/rhoapi.js +6 -3
- data/lib/commonAPI/mediacapture/ext.yml +1 -2
- data/lib/commonAPI/mediacapture/ext/build.bat +8 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro +82 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/Rakefile +35 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/resources/diaClosed.png +0 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/resources/diaOpened.png +0 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/resources/mediacapture.qrc +7 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/resources/photoSave.png +0 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.cpp +83 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.h +54 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogBuilder.h +36 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogController.h +31 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogView.h +73 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/Camera_impl.cpp +337 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/ImageFileNameGetter.h +40 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/ImageFilenameGetterResult.h +36 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/cameracrossthreadhalper.h +17 -0
- data/lib/commonAPI/mediacapture/ext/platform/qt/src/cameradialogview.cpp +178 -0
- data/lib/commonAPI/mediacapture/ext/shared/MediacaptureInit.cpp +8 -8
- data/lib/framework/rhodes.rb +1 -1
- data/lib/framework/version.rb +1 -1
- data/platform/android/Rhodes/AndroidManifest.xml.erb +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +9 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +33 -0
- data/platform/android/build/android.rake +97 -43
- data/platform/android/build/android_studio_project_generator.rb +21 -0
- data/platform/android/build/android_tools.rb +8 -6
- data/platform/iphone/Classes/AppManager/AppManager.h +6 -0
- data/platform/iphone/Classes/AppManager/AppManager.m +76 -37
- data/platform/iphone/Classes/MapView/GoogleGeocoder.m +2 -3
- data/platform/iphone/Classes/MapView/MapViewController.m +3 -3
- data/platform/iphone/Classes/NativeBar.h +1 -0
- data/platform/iphone/Classes/NativeBar.m +15 -0
- data/platform/iphone/Classes/RhoViewController.m +8 -3
- data/platform/iphone/Classes/RhoWKWebView.m +1 -1
- data/platform/iphone/Classes/Rhodes.m +55 -38
- data/platform/iphone/Classes/SimpleMainView.m +3 -2
- data/platform/iphone/Classes/TabbedMainView.h +2 -0
- data/platform/iphone/Classes/TabbedMainView.m +15 -3
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.h +2 -0
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +185 -30
- data/platform/iphone/Classes/rho/net/IPhoneNetRequest.mm +105 -6
- data/platform/iphone/rbuild/iphone.rake +426 -267
- data/platform/iphone/rbuild/putsOverride.rake +8 -0
- data/platform/shared/api_generator/iphone/CJSConverter.mm +5 -3
- data/platform/shared/common/BundleManager.cpp +16 -6
- data/platform/shared/common/PosixThreadImpl.cpp +10 -4
- data/platform/shared/common/RhoTime.cpp +81 -40
- data/platform/shared/common/RhodesApp.cpp +2 -2
- data/platform/shared/common/RhodesApp.h +1 -1
- data/platform/shared/db/DBAdapter.cpp +33 -0
- data/platform/shared/db/DBAdapter.h +5 -0
- data/platform/shared/logging/RhoLogConf.cpp +17 -1
- data/platform/shared/logging/RhoLogConf.h +6 -0
- data/platform/shared/net/CURLNetRequest.cpp +6 -0
- data/platform/shared/net/HttpServer.cpp +27 -1
- data/platform/shared/net/INetRequest.cpp +33 -6
- data/platform/shared/net/INetRequest.h +2 -0
- data/platform/shared/qt/RhoSimulator_dev.pro +14 -10
- data/platform/shared/qt/rhodes/QtMainWindow.cpp +2 -2
- data/platform/shared/qt/rhodes/iexecutable.h +27 -0
- data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +5 -0
- data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +3 -0
- data/platform/shared/qt/rhodes/qkineticscroller.cpp +2 -2
- data/platform/shared/qt/rhodes/qkineticscroller_p.h +1 -1
- data/platform/shared/qt/rhodes/qtscrollerfilter.cpp +3 -3
- data/platform/shared/qt/rhodes/qtscrollevent.cpp +2 -2
- data/platform/shared/qt/rhodes/qwebviewkineticscroller.cpp +1 -1
- data/platform/shared/qt/rhodes/qwebviewkineticscroller.h +1 -1
- data/platform/shared/qt/rhodes/resources/rho.png +0 -0
- data/platform/shared/qt/rhodes/rhodes.pro +3 -2
- data/platform/wm/build/wm.rake +28 -9
- data/platform/wm/rhodes/browser/BrowserFactory.cpp +4 -6
- data/platform/wm/rhodes/browser/stubs.cpp +5 -0
- data/platform/wm/rhodes/rho/net/NetRequestImpl.h +3 -0
- data/platform/wm/rhodes/rhodes.vcproj +31 -2
- data/rakefile.rb +53 -14
- data/res/build-tools/iphonesim/build/Release/iphonesim_8 +2 -2
- data/res/generators/rhogen.rb +6 -147
- data/res/generators/templates/api/platform/iphone/generated/base_impl/MontanaBase.m +7 -7
- data/res/generators/templates/api/platform/iphone/generated/javascript/montana_js_wrap.mm +2 -4
- data/res/generators/templates/application/AndroidManifest.erb +1 -1
- data/res/generators/templates/application/app/Settings/home.erb +1 -1
- data/res/generators/templates/application/build.yml +52 -6
- data/res/generators/templates/application/icon/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-hdpi/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-hdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-hdpi/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-ldpi/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-ldpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-ldpi/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-mdpi/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-mdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-mdpi/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xhdpi/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xhdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xhdpi/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xxhdpi/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xxhdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xxhdpi/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xxxhdpi/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xxxhdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable-xxxhdpi/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable/ic_notification.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/drawable/loading.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap-hdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap-ldpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap-mdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap-xhdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap-xxhdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap-xxxhdpi/icon.png +0 -0
- data/res/generators/templates/application/resources/android/res/mipmap/icon.png +0 -0
- data/res/generators/templates/application/{app/loading-568h@2x.png → resources/ios/Default-568h@2x.png} +0 -0
- data/res/generators/templates/application/{app/loading-667h@2x.png → resources/ios/Default-667h@2x.png} +0 -0
- data/res/generators/templates/application/{app/loading-736h@3x.png → resources/ios/Default-736h@3x.png} +0 -0
- data/res/generators/templates/application/{app/loading-Landscape.png → resources/ios/Default-Landscape.png} +0 -0
- data/res/generators/templates/application/{app/loading-Landscape@2x.png → resources/ios/Default-Landscape@2x.png} +0 -0
- data/res/generators/templates/application/{app/loading-LandscapeLeft.png → resources/ios/Default-LandscapeLeft.png} +0 -0
- data/res/generators/templates/application/{app/loading-LandscapeLeft@2x.png → resources/ios/Default-LandscapeLeft@2x.png} +0 -0
- data/res/generators/templates/application/{app/loading-LandscapeRight.png → resources/ios/Default-LandscapeRight.png} +0 -0
- data/res/generators/templates/application/{app/loading-LandscapeRight@2x.png → resources/ios/Default-LandscapeRight@2x.png} +0 -0
- data/res/generators/templates/application/{app/loading-Portrait.png → resources/ios/Default-Portrait.png} +0 -0
- data/res/generators/templates/application/{app/loading-Portrait@2x.png → resources/ios/Default-Portrait@2x.png} +0 -0
- data/res/generators/templates/application/{app/loading-PortraitUpsideDown.png → resources/ios/Default-PortraitUpsideDown.png} +0 -0
- data/res/generators/templates/application/{app/loading-PortraitUpsideDown@2x.png → resources/ios/Default-PortraitUpsideDown@2x.png} +0 -0
- data/res/generators/templates/application/resources/ios/Default.png +0 -0
- data/res/generators/templates/application/{app/loading@2x.png → resources/ios/Default@2x.png} +0 -0
- data/res/generators/templates/application/resources/ios/iTunesArtwork.png +0 -0
- data/res/generators/templates/application/resources/ios/iTunesArtwork@2x.png +0 -0
- data/res/generators/templates/application/resources/ios/icon114.png +0 -0
- data/res/generators/templates/application/resources/ios/icon120.png +0 -0
- data/res/generators/templates/application/resources/ios/icon144.png +0 -0
- data/res/generators/templates/application/resources/ios/icon152.png +0 -0
- data/res/generators/templates/application/resources/ios/icon180.png +0 -0
- data/res/generators/templates/application/resources/ios/icon57.png +0 -0
- data/res/generators/templates/application/resources/ios/icon60.png +0 -0
- data/res/generators/templates/application/resources/ios/icon72.png +0 -0
- data/res/generators/templates/application/resources/ios/icon76.png +0 -0
- data/res/generators/templates/application/rhoconfig.txt +2 -1
- data/res/generators/templates/iphone_project/Bremen7.xcodeproj/project.pbxproj +44 -0
- data/res/generators/templates/iphone_project/Resources/back_btn.png +0 -0
- data/res/generators/templates/iphone_project/Resources/back_btn@2x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/back_btn@3x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/forward_btn.png +0 -0
- data/res/generators/templates/iphone_project/Resources/forward_btn@2x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/forward_btn@3x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/gears.png +0 -0
- data/res/generators/templates/iphone_project/Resources/gears@2x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/gears@3x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/home_btn.png +0 -0
- data/res/generators/templates/iphone_project/Resources/home_btn@2x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/home_btn@3x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/sync_btn.png +0 -0
- data/res/generators/templates/iphone_project/Resources/sync_btn@2x.png +0 -0
- data/res/generators/templates/iphone_project/Resources/sync_btn@3x.png +0 -0
- data/res/generators/templates/iphone_project/buildRhoBundle +23 -7
- data/res/generators/templates/iphone_project/root/Info.plist +0 -7
- data/res/generators/templates/iphone_project/root/iTunesArtwork +0 -0
- data/res/generators/templates/iphone_project/root/iTunesArtwork@2x +0 -0
- data/res/generators/templates/iphone_project/root/icon114.png +0 -0
- data/res/generators/templates/iphone_project/root/icon120.png +0 -0
- data/res/generators/templates/iphone_project/root/icon144.png +0 -0
- data/res/generators/templates/iphone_project/root/icon152.png +0 -0
- data/res/generators/templates/iphone_project/root/icon180.png +0 -0
- data/res/generators/templates/iphone_project/root/icon57.png +0 -0
- data/res/generators/templates/iphone_project/root/icon60.png +0 -0
- data/res/generators/templates/iphone_project/root/icon72.png +0 -0
- data/res/generators/templates/iphone_project/root/icon76.png +0 -0
- data/res/generators/templates/project/android_studio_project/app/build.gradle.erb +88 -0
- data/res/generators/templates/project/android_studio_project/build.gradle +23 -0
- data/res/generators/templates/project/android_studio_project/gradle.properties +17 -0
- data/res/generators/templates/project/android_studio_project/gradlew +160 -0
- data/res/generators/templates/project/android_studio_project/gradlew.bat +90 -0
- data/res/generators/templates/project/android_studio_project/settings.gradle +1 -0
- data/rhodes.gemspec +7 -6
- data/version +1 -1
- metadata +135 -42
- data/res/generators/templates/application/icon/icon.svg +0 -22
- data/res/generators/templates/application/icon/icon114.png +0 -0
- data/res/generators/templates/application/icon/icon120.png +0 -0
- data/res/generators/templates/application/icon/icon144.png +0 -0
- data/res/generators/templates/application/icon/icon152.png +0 -0
- data/res/generators/templates/application/icon/icon180.png +0 -0
- data/res/generators/templates/application/icon/icon57.png +0 -0
- data/res/generators/templates/application/icon/icon60.png +0 -0
- data/res/generators/templates/application/icon/icon72.png +0 -0
- data/res/generators/templates/application/icon/icon76.png +0 -0
- data/res/generators/templates/application/production/iTunesArtwork.png +0 -0
- data/res/generators/templates/application/production/iTunesArtwork@2x.png +0 -0
@@ -93,7 +93,7 @@ extern void rho_geocoding_parse_json_responce(const char* data, char* adress
|
|
93
93
|
// [url appendString:@"&key="];
|
94
94
|
// [url appendString:gapikey];
|
95
95
|
//}
|
96
|
-
|
96
|
+
RAWLOG_INFO1("Geocoding url = %s\n", [url UTF8String]);
|
97
97
|
NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:url]
|
98
98
|
cachePolicy:NSURLRequestUseProtocolCachePolicy
|
99
99
|
timeoutInterval:60.0];
|
@@ -138,11 +138,10 @@ extern void rho_geocoding_parse_json_responce(const char* data, char* adress
|
|
138
138
|
//[self stringCooridinatesToCLLocation];
|
139
139
|
}
|
140
140
|
@catch (NSException *exception) {
|
141
|
-
|
141
|
+
RAWLOG_WARNING("Geocoding failed");
|
142
142
|
retvar = FALSE;
|
143
143
|
}
|
144
144
|
@finally {
|
145
|
-
//NSLog(@"finally");
|
146
145
|
}
|
147
146
|
return retvar;
|
148
147
|
}
|
@@ -432,7 +432,7 @@ static MapViewController *mc = nil;
|
|
432
432
|
{
|
433
433
|
MapAnnotation *ann = (MapAnnotation*)[view annotation];
|
434
434
|
NSString* url = [ann url];
|
435
|
-
|
435
|
+
RAWLOG_INFO1("Callout tapped... Url = %s\n", [url UTF8String]);
|
436
436
|
id<RhoMainView> mainView = [[Rhodes sharedInstance] mainView];
|
437
437
|
[mainView navigateRedirect:url tab:[mainView activeTab]];
|
438
438
|
[self dismissModalViewControllerAnimated:YES];
|
@@ -476,7 +476,7 @@ static MapViewController *mc = nil;
|
|
476
476
|
}*/
|
477
477
|
|
478
478
|
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{
|
479
|
-
|
479
|
+
RAWLOG_ERROR("Reverse Geocoder Errored");
|
480
480
|
}
|
481
481
|
|
482
482
|
- (void)didFindAddress:(MapAnnotation*)annotation {
|
@@ -496,7 +496,7 @@ static MapViewController *mc = nil;
|
|
496
496
|
}
|
497
497
|
|
498
498
|
- (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{
|
499
|
-
|
499
|
+
RAWLOG_INFO("Reverse Geocoder completed");
|
500
500
|
//mPlacemark=placemark;
|
501
501
|
//[mapView addAnnotation:placemark];
|
502
502
|
}
|
@@ -42,6 +42,7 @@
|
|
42
42
|
#define NATIVE_BAR_DETAIL_COLOR @"detailColor"
|
43
43
|
#define NATIVE_BAR_MAX_WIDTH @"maxWidth"
|
44
44
|
#define NATIVE_BAR_FIXED_WIDTH @"fixedWidth"
|
45
|
+
#define NATIVE_BAR_TABBAR_INVISIBLE @"invisibleTabControl"
|
45
46
|
|
46
47
|
#define NATIVE_BAR_ITEM_LABEL @"label"
|
47
48
|
#define NATIVE_BAR_ITEM_DETAIL_LABEL @"detailLabel"
|
@@ -178,6 +178,8 @@ void rho_create_nativebar_inner(int bar_type, NSArray* p_items, NSDictionary* p_
|
|
178
178
|
const char* ios_7_icon_color = NULL;
|
179
179
|
const char* ios_7_selected_color = NULL;
|
180
180
|
const char* detail_color = NULL;
|
181
|
+
const char* tabbar_invisible = NULL;
|
182
|
+
|
181
183
|
NSNumber* nMaxWidth = NULL, *nFixedWidth = NULL;
|
182
184
|
|
183
185
|
NSObject* obj = nil;
|
@@ -219,6 +221,16 @@ void rho_create_nativebar_inner(int bar_type, NSArray* p_items, NSDictionary* p_
|
|
219
221
|
if (obj != nil) {
|
220
222
|
nFixedWidth = (NSNumber*)obj;
|
221
223
|
}
|
224
|
+
obj = [p_properties objectForKey:NATIVE_BAR_TABBAR_INVISIBLE];
|
225
|
+
if (obj != nil) {
|
226
|
+
NSNumber* obj_num = (NSNumber*)obj;
|
227
|
+
if ([obj_num boolValue]) {
|
228
|
+
tabbar_invisible = "true";
|
229
|
+
}
|
230
|
+
else {
|
231
|
+
tabbar_invisible = "false";
|
232
|
+
}
|
233
|
+
}
|
222
234
|
}
|
223
235
|
|
224
236
|
int size = [p_items count];//params->v.array->size;
|
@@ -432,6 +444,9 @@ void rho_create_nativebar_inner(int bar_type, NSArray* p_items, NSDictionary* p_
|
|
432
444
|
if (detail_color != NULL) {
|
433
445
|
[properties setObject:[NSString stringWithUTF8String:detail_color] forKey:NATIVE_BAR_DETAIL_COLOR];
|
434
446
|
}
|
447
|
+
if (tabbar_invisible != NULL) {
|
448
|
+
[properties setObject:[NSString stringWithUTF8String:tabbar_invisible] forKey:NATIVE_BAR_TABBAR_INVISIBLE];
|
449
|
+
}
|
435
450
|
|
436
451
|
//COMMONAPI
|
437
452
|
if (callback != NULL) {
|
@@ -27,10 +27,15 @@
|
|
27
27
|
#import "Rhodes.h"
|
28
28
|
#import "RhoViewController.h"
|
29
29
|
|
30
|
+
#import "logging/RhoLog.h"
|
31
|
+
|
32
|
+
#undef DEFAULT_LOGCATEGORY
|
33
|
+
#define DEFAULT_LOGCATEGORY "RhoViewController"
|
34
|
+
|
30
35
|
@implementation RhoViewController
|
31
36
|
|
32
37
|
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
|
33
|
-
|
38
|
+
RAWTRACE1("RVC::%s::shouldAutorotateToInterfaceOrientation", [[[self class] description] UTF8String]);
|
34
39
|
if ([[Rhodes sharedInstance] isRotationLocked])
|
35
40
|
return toInterfaceOrientation == UIInterfaceOrientationPortrait;
|
36
41
|
return YES;
|
@@ -38,7 +43,7 @@
|
|
38
43
|
|
39
44
|
#if defined(__IPHONE_6_0)
|
40
45
|
- (BOOL)shouldAutorotate {
|
41
|
-
|
46
|
+
RAWTRACE1("RVC::%s::shouldAutorotate", [[[self class] description] UTF8String]);
|
42
47
|
if ([[Rhodes sharedInstance] isRotationLocked])
|
43
48
|
return NO;
|
44
49
|
|
@@ -79,7 +84,7 @@
|
|
79
84
|
|
80
85
|
- (NSUInteger)supportedInterfaceOrientations
|
81
86
|
{
|
82
|
-
|
87
|
+
RAWTRACE1("RVC::%s::supportedInterfaceOrientations", [[[self class] description] UTF8String]);
|
83
88
|
if ([[Rhodes sharedInstance] isRotationLocked])
|
84
89
|
return UIInterfaceOrientationMaskPortrait;
|
85
90
|
return UIInterfaceOrientationMaskAll;
|
@@ -94,7 +94,7 @@
|
|
94
94
|
resultString = [NSString stringWithFormat:@"%@", result];
|
95
95
|
}
|
96
96
|
} else {
|
97
|
-
|
97
|
+
RAWLOG_ERROR1("WKWebView.evaluateJavaScript error : %s", [[error localizedDescription] UTF8String]);
|
98
98
|
}
|
99
99
|
finished = YES;
|
100
100
|
}];
|
@@ -648,22 +648,32 @@ static Rhodes *instance = NULL;
|
|
648
648
|
- (void)doRhoActivate {
|
649
649
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
650
650
|
@try {
|
651
|
-
|
651
|
+
[AppManager startupLogging:@"doRhoActivate thread started"];
|
652
652
|
while (!app_created)
|
653
653
|
[NSThread sleepForTimeInterval:0.1];
|
654
654
|
[Rhodes performOnUiThread:[RhoActivateTask class] wait:NO];
|
655
655
|
}
|
656
656
|
@finally {
|
657
|
-
|
657
|
+
[AppManager startupLogging:@"doRhoActivate thread finished"];
|
658
658
|
[pool release];
|
659
659
|
}
|
660
660
|
}
|
661
661
|
|
662
662
|
- (void)initAppManager {
|
663
|
-
|
663
|
+
// log not ready
|
664
|
+
[AppManager startupLogging:@"Init appManager"];
|
665
|
+
|
664
666
|
appManager = [AppManager instance];
|
665
|
-
//Configure AppManager
|
667
|
+
//Configure AppManager - setup files and symlinks etc.
|
666
668
|
[appManager configure];
|
669
|
+
|
670
|
+
// log not ready
|
671
|
+
[AppManager startupLogging:@"Create rhodes logging and rhoconfig.txt loading"];
|
672
|
+
rho_logconf_Init_with_separate_user_path(rho_native_rhopath(), rho_native_rhopath(), "", rho_native_rhouserpath());
|
673
|
+
[AppManager startupLogging:@"Create rhodes app"];
|
674
|
+
rho_rhodesapp_create_with_separate_user_path(rho_native_rhopath(), rho_native_rhouserpath());
|
675
|
+
RAWLOG_INFO("Rhodes started");
|
676
|
+
|
667
677
|
}
|
668
678
|
|
669
679
|
- (void)doRhoInit {
|
@@ -676,25 +686,28 @@ static Rhodes *instance = NULL;
|
|
676
686
|
|
677
687
|
const char *szRootPath = rho_native_rhopath();
|
678
688
|
const char *szUserPath = rho_native_rhouserpath();
|
689
|
+
|
690
|
+
// Now this methods executed not in separate thread - executed in thread of app's delegate
|
679
691
|
//NSLog(@"Init logconf");
|
680
692
|
//rho_logconf_Init_with_separate_user_path(szRootPath, szRootPath, "", szUserPath);
|
681
693
|
InitMemoryInfoCollector();
|
682
694
|
//NSLog(@"Create rhodes app");
|
683
695
|
//rho_rhodesapp_create_with_separate_user_path(szRootPath, szUserPath);
|
696
|
+
|
684
697
|
app_created = YES;
|
685
698
|
|
686
699
|
rotationLocked = rho_conf_getBool("disable_screen_rotation");
|
687
700
|
|
688
|
-
|
701
|
+
RAWLOG_INFO("Init network monitor");
|
689
702
|
mNetworkPollCondition = [[NSCondition alloc] init];
|
690
703
|
|
691
704
|
initNetworkMonitoring();
|
692
705
|
[self performSelectorInBackground:@selector(monitorNetworkStatus) withObject:nil];
|
693
706
|
|
694
|
-
|
707
|
+
RAWLOG_INFO("Show loading page");
|
695
708
|
[self performSelectorOnMainThread:@selector(showLoadingPagePost) withObject:nil waitUntilDone:NO];
|
696
709
|
|
697
|
-
|
710
|
+
RAWLOG_INFO("Start rhodes app");
|
698
711
|
rho_rhodesapp_start();
|
699
712
|
rho_rhodesapp_callUiCreatedCallback();
|
700
713
|
[self registerForNotifications];
|
@@ -741,7 +754,8 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
741
754
|
}
|
742
755
|
|
743
756
|
- (void)doStartUp {
|
744
|
-
|
757
|
+
// log not ready
|
758
|
+
[AppManager startupLogging:@"Rhodes starting application..."];
|
745
759
|
|
746
760
|
[CRhoURLProtocol initAndRegister];
|
747
761
|
|
@@ -749,15 +763,17 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
749
763
|
|
750
764
|
const char *szRootPath = rho_native_rhopath();
|
751
765
|
const char *szUserPath = rho_native_rhouserpath();
|
752
|
-
NSLog(@"Init logconf");
|
753
|
-
|
766
|
+
//NSLog(@"Init logconf");
|
767
|
+
|
768
|
+
// now executed in [self initAppManager]
|
769
|
+
//rho_logconf_Init_with_separate_user_path(szRootPath, szRootPath, "", szUserPath);
|
754
770
|
|
755
771
|
[self initAppManager];
|
756
772
|
|
757
|
-
|
773
|
+
RAWLOG_INFO("Create new detached thread for initialization stuff");
|
758
774
|
[NSThread detachNewThreadSelector:@selector(doRhoInit) toTarget:self withObject:nil];
|
759
775
|
|
760
|
-
|
776
|
+
RAWLOG_INFO(@"Init all windows");
|
761
777
|
|
762
778
|
[[NSHTTPCookieStorage sharedHTTPCookieStorage] setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
|
763
779
|
|
@@ -799,21 +815,21 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
799
815
|
|
800
816
|
CGRect rrr = [application statusBarFrame];
|
801
817
|
|
802
|
-
|
818
|
+
RAWLOG_INFO("Init cookies");
|
803
819
|
cookies = [[NSMutableDictionary alloc] initWithCapacity:0];
|
804
820
|
|
805
821
|
// Init controllers
|
806
|
-
|
822
|
+
RAWLOG_INFO("Init controllers");
|
807
823
|
logOptionsController = [[LogOptionsController alloc] init];
|
808
824
|
logViewController = [[LogViewController alloc] init];
|
809
825
|
|
810
|
-
|
826
|
+
RAWLOG_INFO("Init delegates");
|
811
827
|
dateTimePickerDelegate = [[DateTimePickerDelegate alloc] init];
|
812
828
|
pickImageDelegate = [[PickImageDelegate alloc] init];
|
813
829
|
signatureDelegate = [SignatureDelegate getSharedInstance];
|
814
830
|
nvDelegate = [[NVDelegate alloc] init];
|
815
831
|
|
816
|
-
|
832
|
+
RAWLOG_INFO("Initialization finished");
|
817
833
|
}
|
818
834
|
|
819
835
|
- (void) registerForPushNotificationsInternal:(id<IPushNotificationsReceiver>)receiver;
|
@@ -887,10 +903,10 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
887
903
|
NSEnumerator *enumerator = [do_sync objectEnumerator];
|
888
904
|
id url;
|
889
905
|
|
890
|
-
|
906
|
+
RAWLOG_INFO("do_sync array: ");
|
891
907
|
bool sync_all = false;
|
892
908
|
while ( url = [enumerator nextObject] ) {
|
893
|
-
|
909
|
+
RAWLOG_INFO1( "url = %s", [(NSString*)url UTF8String] );
|
894
910
|
if ([@"all" caseInsensitiveCompare:url] == NSOrderedSame) {
|
895
911
|
sync_all = true;
|
896
912
|
} else {
|
@@ -924,12 +940,12 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
924
940
|
} else{
|
925
941
|
soundFilePath = [[AppManager getApplicationsRootPath] stringByAppendingPathComponent:fileName];
|
926
942
|
}
|
927
|
-
|
943
|
+
RAWLOG_INFO1("Playing %s: ", [soundFilePath UTF8String]);
|
928
944
|
|
929
945
|
NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: soundFilePath];
|
930
946
|
NSError* err = nil;
|
931
947
|
AVAudioPlayer *newPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:&err];
|
932
|
-
|
948
|
+
RAWLOG_INFO1("Init media player returns: %s", [[err localizedDescription] UTF8String]);
|
933
949
|
|
934
950
|
[fileURL release];
|
935
951
|
self.player = newPlayer;
|
@@ -952,12 +968,12 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
952
968
|
|
953
969
|
- (void) audioPlayerDidFinishPlaying: (AVAudioPlayer *) player successfully: (BOOL) flag {
|
954
970
|
if (flag == YES) {
|
955
|
-
|
971
|
+
RAWLOG_INFO("Audio player finished playing...");
|
956
972
|
}
|
957
973
|
}
|
958
974
|
|
959
975
|
- (void)audioPlayerDecodeErrorDidOccur:(AVAudioPlayer *)player error:(NSError *)error {
|
960
|
-
|
976
|
+
RAWLOG_INFO1("Audio player decoding error %s", [[error localizedDescription] UTF8String]);
|
961
977
|
}
|
962
978
|
|
963
979
|
|
@@ -970,12 +986,12 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
970
986
|
|
971
987
|
|
972
988
|
- (void)doStartUpRe:(NSObject*)arg {
|
973
|
-
|
989
|
+
RAWLOG_INFO("Rhodes starting application...");
|
974
990
|
rotationLocked = NO;
|
975
991
|
|
976
992
|
[self initAppManager];
|
977
993
|
|
978
|
-
|
994
|
+
RAWLOG_INFO("Create new detached thread for initialization stuff");
|
979
995
|
[NSThread detachNewThreadSelector:@selector(doRhoInit) toTarget:self withObject:nil];
|
980
996
|
|
981
997
|
if (mainView != nil) {
|
@@ -995,12 +1011,12 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
995
1011
|
[window addSubview:mainView.view];
|
996
1012
|
}
|
997
1013
|
|
998
|
-
|
1014
|
+
RAWLOG_INFO("Init cookies");
|
999
1015
|
cookies = [[NSMutableDictionary alloc] initWithCapacity:0];
|
1000
1016
|
|
1001
1017
|
rho_rhodesapp_canstartapp("", ", ");
|
1002
1018
|
|
1003
|
-
|
1019
|
+
RAWLOG_INFO("Initialization finished");
|
1004
1020
|
}
|
1005
1021
|
|
1006
1022
|
|
@@ -1036,7 +1052,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1036
1052
|
#ifdef APP_BUILD_CAPABILITY_PUSH
|
1037
1053
|
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
|
1038
1054
|
UIRemoteNotificationType nt = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
|
1039
|
-
|
1055
|
+
RAWLOG_INFO1("Enabled notification types: %d", (int)nt);
|
1040
1056
|
#else
|
1041
1057
|
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge)];
|
1042
1058
|
#endif
|
@@ -1073,7 +1089,8 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1073
1089
|
|
1074
1090
|
|
1075
1091
|
NSURL* url = [launchOptions objectForKey:UIApplicationLaunchOptionsURLKey];
|
1076
|
-
|
1092
|
+
// log not ready
|
1093
|
+
[AppManager startupLogging:[NSString stringWithFormat:@"didFinishLaunchingWithOptions: %@", [url absoluteString]]];
|
1077
1094
|
|
1078
1095
|
|
1079
1096
|
//[self registerForRemoteNotification];
|
@@ -1099,7 +1116,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1099
1116
|
if ( !rho_rhodesapp_canstartapp([start_parameter UTF8String], ", ") )
|
1100
1117
|
{
|
1101
1118
|
//const char* szAppSecToken = get_app_build_config_item("security_token");
|
1102
|
-
|
1119
|
+
RAWLOG_ERROR("This is hidden app and can be started only with security key.");
|
1103
1120
|
/*
|
1104
1121
|
{
|
1105
1122
|
|
@@ -1162,7 +1179,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1162
1179
|
|
1163
1180
|
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken
|
1164
1181
|
{
|
1165
|
-
|
1182
|
+
RAWLOG_INFO1([[NSString stringWithFormat:@"PUSH My token is: %@", deviceToken] UTF8String]);
|
1166
1183
|
if ( pushReceiver != nil ) {
|
1167
1184
|
[pushReceiver onPushRegistrationSucceed:deviceToken];
|
1168
1185
|
}
|
@@ -1170,7 +1187,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1170
1187
|
|
1171
1188
|
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error
|
1172
1189
|
{
|
1173
|
-
|
1190
|
+
RAWLOG_INFO1([[NSString stringWithFormat:@"PUSH Failed to get token, error: %@", error] UTF8String]);
|
1174
1191
|
if ( pushReceiver != nil ) {
|
1175
1192
|
[pushReceiver onPushRegistrationFailed:error];
|
1176
1193
|
}
|
@@ -1178,7 +1195,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1178
1195
|
|
1179
1196
|
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo
|
1180
1197
|
{
|
1181
|
-
|
1198
|
+
RAWLOG_INFO1([[NSString stringWithFormat:@"PUSH Received notification: %@", userInfo] UTF8String]);
|
1182
1199
|
if ( pushReceiver != nil ) {
|
1183
1200
|
[pushReceiver onPushMessageReceived:userInfo];
|
1184
1201
|
}
|
@@ -1198,7 +1215,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1198
1215
|
}
|
1199
1216
|
|
1200
1217
|
if (!app_created) {
|
1201
|
-
|
1218
|
+
RAWLOG_INFO("Application is not created yet so postpone activation callback");
|
1202
1219
|
[NSThread detachNewThreadSelector:@selector(doRhoActivate) toTarget:self withObject:nil];
|
1203
1220
|
}
|
1204
1221
|
else
|
@@ -1236,7 +1253,7 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1236
1253
|
if ([[UIDevice currentDevice] isMultitaskingSupported]) { //Check if device supports mulitasking
|
1237
1254
|
|
1238
1255
|
syncBackgroundTask = [app beginBackgroundTaskWithExpirationHandler: ^ {
|
1239
|
-
|
1256
|
+
RAWLOG_ERROR("$$$ Background task is terminated by System !!!");
|
1240
1257
|
|
1241
1258
|
// If the background task is already invalid, don't try to end it.
|
1242
1259
|
if (syncBackgroundTask != UIBackgroundTaskInvalid) {
|
@@ -1245,18 +1262,18 @@ static void displayStatusChanged(CFNotificationCenterRef center, void *observer,
|
|
1245
1262
|
}
|
1246
1263
|
}];
|
1247
1264
|
|
1248
|
-
|
1265
|
+
RAWLOG_INFO("Will wait sync thread to finish sync");
|
1249
1266
|
|
1250
1267
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
1251
|
-
|
1268
|
+
RAWLOG_INFO("Waiting for sync thread");
|
1252
1269
|
|
1253
1270
|
do
|
1254
1271
|
{
|
1255
|
-
|
1272
|
+
RAWLOG_INFO1("Check sync, rho_rcclient_issyncing = %d", rho_rcclient_issyncing());
|
1256
1273
|
[NSThread sleepForTimeInterval:1];
|
1257
1274
|
} while (rho_rcclient_issyncing() == 1);
|
1258
1275
|
|
1259
|
-
|
1276
|
+
RAWLOG_INFO1("Sync is finished, rho_rcclient_issyncing = %d", rho_rcclient_issyncing());
|
1260
1277
|
|
1261
1278
|
// If the background task is already invalid, don't try to end it.
|
1262
1279
|
if (syncBackgroundTask != UIBackgroundTaskInvalid) {
|
@@ -474,7 +474,8 @@ static BOOL makeHiddenUntilLoadContent = YES;
|
|
474
474
|
// DO NOT REMOVE THIS LINE!!!
|
475
475
|
// First call of self.view (when self.view is nil) trigger loadView
|
476
476
|
// and viewDidLoad which add all our subviews to the root view
|
477
|
-
|
477
|
+
NSString* s = [NSString stringWithFormat:@"root view: %@", self.view];
|
478
|
+
RAWLOG_INFO([s UTF8String]);
|
478
479
|
|
479
480
|
return self;
|
480
481
|
}
|
@@ -1016,7 +1017,7 @@ static BOOL makeHiddenUntilLoadContent = YES;
|
|
1016
1017
|
|
1017
1018
|
navbar = navb;
|
1018
1019
|
assert([navbar retainCount] == 1);
|
1019
|
-
|
1020
|
+
RAWLOG_INFO1("navbar retain count: %d", (int)[navbar retainCount]);
|
1020
1021
|
navbar.autoresizingMask = UIViewAutoresizingFlexibleWidth;
|
1021
1022
|
navbar.autoresizesSubviews = YES;
|
1022
1023
|
|
@@ -55,12 +55,14 @@
|
|
55
55
|
int tabindex;
|
56
56
|
id<IMethodResult> on_change_tab_callback;
|
57
57
|
CGRect rootFrame;
|
58
|
+
BOOL invisible_tab_control;
|
58
59
|
}
|
59
60
|
|
60
61
|
@property (nonatomic,retain) UITabBarController *tabbar;
|
61
62
|
@property (nonatomic,retain) NSArray *tabbarData;
|
62
63
|
@property (nonatomic,assign) int tabindex;
|
63
64
|
@property (nonatomic,assign) id<IMethodResult> on_change_tab_callback;
|
65
|
+
@property (nonatomic,assign) BOOL invisible_tab_control;
|
64
66
|
|
65
67
|
- (id)initWithMainView:(id<RhoMainView>)v parent:(UIWindow*)p bar_info:(NSDictionary*)bar_info;
|
66
68
|
|