File tree Expand file tree Collapse file tree 5 files changed +16
-7
lines changed
AppWithModules/Source Files
project-template/internal Expand file tree Collapse file tree 5 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ int main(int argc, char *argv[]) {
24
24
config.ArgumentsCount = argc;
25
25
config.Arguments = argv;
26
26
27
- nativescript = [NativeScript alloc ] initWithConfig: config];
27
+ nativescript = [[NativeScript alloc ] initWithConfig: config];
28
+ [nativescript runMainApplication ];
28
29
29
30
return 0 ;
30
31
}
Original file line number Diff line number Diff line change 15
15
@interface NativeScript : NSObject
16
16
17
17
- (instancetype )initWithConfig : (Config*)config ;
18
+ /* *
19
+ WARNING: this method does not return in most applications. (UIApplicationMain)
20
+ */
21
+ - (void )runMainApplication ;
18
22
- (bool )liveSync ;
19
23
20
24
@end
Original file line number Diff line number Diff line change @@ -53,18 +53,20 @@ - (instancetype)initWithConfig:(Config*)config {
53
53
inspectorClient->registerModules ();
54
54
inspectorClient->connect ([config ArgumentsCount ], [config Arguments ]);
55
55
}
56
-
57
- runtime_->RunMainScript ();
58
-
59
- CFRunLoopRunInMode (kCFRunLoopDefaultMode , 0 , true );
60
-
61
- tns::Tasks::Drain ();
62
56
}
63
57
64
58
return self;
65
59
66
60
}
67
61
62
+ - (void )runMainApplication {
63
+ runtime_->RunMainScript ();
64
+
65
+ CFRunLoopRunInMode (kCFRunLoopDefaultMode , 0 , true );
66
+
67
+ tns::Tasks::Drain ();
68
+ }
69
+
68
70
- (bool )liveSync {
69
71
if (runtime_ == nullptr ) {
70
72
return false ;
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ int main(int argc, char *argv[]) {
25
25
config.Arguments = argv;
26
26
27
27
nativescript = [[NativeScript alloc ] initWithConfig: config];
28
+ [nativescript runMainApplication ];
28
29
29
30
return 0 ;
30
31
}
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ int main(int argc, char *argv[]) {
57
57
config.Arguments = argv;
58
58
59
59
nativescript = [[NativeScript alloc ] initWithConfig: config];
60
+ [nativescript runMainApplication ];
60
61
61
62
return 0 ;
62
63
}
You can’t perform that action at this time.
0 commit comments