Notalib / nativescript-webview-ext

Nativescript plugin with extended WebView functionality
Apache License 2.0
76 stars 37 forks source link

Build error with plugin 6.5 #69

Closed erjdriver closed 4 years ago

erjdriver commented 4 years ago

Using NS 6.5 and just updated the plugin to 6.5

Get the following build error message

[!] No podspec found forNotaWebViewExtin/home/mabs/project/Notalib/nativescript-webview-ext/src/platforms/ios/NotaWebViewExt/ 'pod install' command failed.

No errors for Android build.

Thanks.

p.s. also is this plugin working on ios 13. I just started with the emulator and plugin 6.3 and it didn't seem like it was working (as it does on Android). It was a quick test.

m-abs commented 4 years ago

Oh, that's embarrassing.

My build machine had an old file that was packaged with 6.5.0.

Until I get a new version published, you should be able to workaround it by manually deleting the file node_nodules/@nota/nativescript-webview-ext/platforms/ios/Podfile.

p.s. also is this plugin working on ios 13. I just started with the emulator and plugin 6.3 and it didn't seem like it was working (as it does on Android). It was a quick test.

It seems there is a problem on the ios simulator, so the native code isn't loaded even on iOS 13. I'm working on a solution.

erjdriver commented 4 years ago

No worries - I deleted the file and was able to get past the build.

But it's still not executing the javascript code.

Will the plugin work with ios 12 emulator?

m-abs commented 4 years ago

Will the plugin work with ios 12 emulator?

Not at the moment.

I'm working on the problem. It looks like the native classes aren't available on the simulator.

m-abs commented 4 years ago

I've just published v6.5.1. It should solve both problems.

erjdriver commented 4 years ago

I downloaded it and tried it on an ios 12.4 emulator.

Previous error message during build is gone - thank you.

But when I try to load a javascript file - the promise doesn't seem to be resolved...

i.e. I see "A" but not "B".

I changed the glob to "assets-js/gm-fa.js" - no luck.

console.log("A");
this.webview.loadJavaScriptFiles( [ { resourceName: "js_code", filepath: "~/assets-js/gm-fa.js" } ] ).then( value =>
                {
                    console.log("B");
                    this.executeJavaScriptTest(`start_login()`);
                } );

In the webconfig file - I did export that file. The same code and js file work on Android.

           new CopyWebpackPlugin([
                { from: { glob: "fonts/**" } },
                { from: { glob: "**/*.jpg" } },
                { from: { glob: "**/assets-js/gm-fa.js" } },
                { from: { glob: "**/*.png" } }
            ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
m-abs commented 4 years ago

@erjdriver

Could you catch me on the community slack? https://nativescriptcommunity.slack.com/ I go by m_abs.

erjdriver commented 4 years ago

I'm there now - njman

i don't know slack...

m-abs commented 4 years ago

I've created new issue for the problem injecting files: #70