Open wzhua opened 7 years ago
@wzhua Hi, did you solve it?
I also need to know. How to solve it? anyone face the same problem and got the solution?
Just add to your declarations.d.ts file declare var startApp:any; and then all will be fine. This is just compilation error from TS.
Still a problem here :(
var sApp = (window as any).startApp.set({
"package": "io.myapp"
});
sApp.start();
Try this.. It works for me.
Hi lampaa, im using this code, but it doesnt work.
facebookButton(){
this.platform.ready().then(()=>{
let appId = AllSocialApps.Facebook.android.appId;
let appStarter = (
And I also try with this one facebookButton(){ this.platform.ready().then(()=>{ let appId = AllSocialApps.Facebook.android.appId; let appStarter = (window as any).startApp.set({ "application": appId }).start(function (msg) { console.log('starting FB app: ' + msg); }, function (err) { console.log('FB app not installed', err); window.open(AllSocialApps.Facebook.android.urlApp, '_system', 'locations=yes'); }); }); }
And then it dosent work, i just take this error Error: Uncaught (en promesa): TypeError: No se puede leer la propiedad 'set' de TypeError indefinido: No se puede leer la propiedad 'set' de undefined en http: // localhost: 8100 / build / main.js: 519: 46 en t.invoke (http: // localhost: 8100 / build / polyfills.js: 3: 14976) en Object.onInvoke (http: // localhost: 8100 / build / vendor.js: 5134: 33) en t.invoke (http: / /localhost:8100/build/polyfills.js:3:14916) en r.run (http: // localhost: 8100 / build / polyfills.js: 3: 10143) en http: // localhost: 8100 / build / polyfills .js: 3: 20242 en t.invokeTask (http: // localhost: 8100 / build / polyfills.js: 3: 15660) en Object.onInvokeTask (http: // localhost: 8100 / build / vendor.js: 5125: 33) en t.invokeTask (http: // localhost: 8100 / build / polyfills.js: 3: 15581) en r.runTask (http: // localhost: 8100 / build / polyfills.js: 3: 10834) en c (http: // localhost: 8100 / build / polyfills.js:3: 19752) en http: // localhost: 8100 / build / polyfills.js: 3: 20273 en t.invokeTask (http: // localhost: 8100 / build / polyfills.js: 3: 15660) en Object.onInvokeTask ( http: // localhost: 8100 / build / vendor.js: 5125: 33) en t.invokeTask (http: // localhost: 8100 / build / polyfills.js: 3: 15581) en r.runTask (http: // localhost: 8100 / build / polyfills.js: 3: 10834) en o (http: // localhost: 8100 / build / polyfills.js: 3: 7894) en e.invokeTask [como invocar] (http: // localhost: 8100 / build / polyfills.js: 3: 16823) en p (http: // localhost: 8100 / build / polyfills.js: 2: 27648) en HTMLImageElement.v (http: // localhost: 8100 / build / polyfills. JS: 2: 27893)invokeTask (http: // localhost: 8100 / build / polyfills.js: 3: 15581) en r.runTask (http: // localhost: 8100 / build / polyfills.js: 3: 10834) en o (http: // localhost: 8100 / build / polyfills.js: 3: 7894) en e.invokeTask [como invocación] (http: // localhost: 8100 / build / polyfills.js: 3: 16823) en p (http: // localhost: 8100 / build / polyfills.js: 2: 27648) en HTMLImageElement.v (http: // localhost: 8100 / build / polyfills.js: 2: 27893)invokeTask (http: // localhost: 8100 / build / polyfills.js: 3: 15581) en r.runTask (http: // localhost: 8100 / build / polyfills.js: 3: 10834) en o (http: // localhost: 8100 / build / polyfills.js: 3: 7894) en e.invokeTask [como invocación] (http: // localhost: 8100 / build / polyfills.js: 3: 16823) en p (http: // localhost: 8100 / build / polyfills.js: 2: 27648) en HTMLImageElement.v (http: // localhost: 8100 / build / polyfills.js: 2: 27893).
Please help me Im using ionic 3..
problem is startApp is undefined. my code :
thank you