File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 },
1212 "hooks" : [
1313 {
14- "type" : " before -prepare" ,
14+ "type" : " after -prepare" ,
1515 "script" : " scripts/ios/appsync-ios.js" ,
1616 "inject" : true
1717 },
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ function patchUIApplicationMain(iosProjectFolder) {
1919 // let's first inject a header we need
2020 replaceInFile (
2121 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>'
2424 ) ;
2525
2626 // now inject the function call that determines the correct application path (either default or appsync'ed)
2727 replaceInFile (
2828 appSyncFileDest ,
29- 'applicationPath = [ NSBundle mainBundle].bundlePath; ' ,
30- 'applicationPath = [TNSAppSync applicationPathWithDefault:[NSBundle mainBundle].bundlePath]; '
29+ '[[ NSBundle mainBundle] resourcePath] ' ,
30+ '[TNSAppSync applicationPathWithDefault:[[ NSBundle mainBundle] resourcePath]] '
3131 ) ;
3232 }
3333
@@ -49,4 +49,4 @@ module.exports = function ($injector, hookArgs) {
4949 const iosProjectFolder = prepareHooksHelper . getNativeProjectDir ( $injector , platform , hookArgs ) ;
5050 patchUIApplicationMain ( iosProjectFolder ) ;
5151 }
52- } ;
52+ } ;
You can’t perform that action at this time.
0 commit comments