File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11
11
},
12
12
"hooks" : [
13
13
{
14
- "type" : " before -prepare" ,
14
+ "type" : " after -prepare" ,
15
15
"script" : " scripts/ios/appsync-ios.js" ,
16
16
"inject" : true
17
17
},
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ function patchUIApplicationMain(iosProjectFolder) {
19
19
// let's first inject a header we need
20
20
replaceInFile (
21
21
appSyncFileDest ,
22
- '#include <NativeScript/NativeScript.h>' ,
23
- '#include <NativeScript/NativeScript.h>\n#include <AppSync/TNSAppSync.h>'
22
+ '#import <NativeScript/NativeScript.h>' ,
23
+ '#import <NativeScript/NativeScript.h>\n#import <AppSync/TNSAppSync.h>'
24
24
) ;
25
25
26
26
// now inject the function call that determines the correct application path (either default or appsync'ed)
27
27
replaceInFile (
28
28
appSyncFileDest ,
29
- 'applicationPath = [ NSBundle mainBundle].bundlePath; ' ,
30
- 'applicationPath = [TNSAppSync applicationPathWithDefault:[NSBundle mainBundle].bundlePath]; '
29
+ '[[ NSBundle mainBundle] resourcePath] ' ,
30
+ '[TNSAppSync applicationPathWithDefault:[[ NSBundle mainBundle] resourcePath]] '
31
31
) ;
32
32
}
33
33
@@ -49,4 +49,4 @@ module.exports = function ($injector, hookArgs) {
49
49
const iosProjectFolder = prepareHooksHelper . getNativeProjectDir ( $injector , platform , hookArgs ) ;
50
50
patchUIApplicationMain ( iosProjectFolder ) ;
51
51
}
52
- } ;
52
+ } ;
You can’t perform that action at this time.
0 commit comments