GithubHelp home page GithubHelp logo

Comments (6)

ne0c0de avatar ne0c0de commented on June 7, 2024

any chance that you reproduce it?

from instagramplugin.

vstirbu avatar vstirbu commented on June 7, 2024

Can you replicate the issue using the sample application using your environment?

from instagramplugin.

ne0c0de avatar ne0c0de commented on June 7, 2024

Sure, i will prepare it and give a link of it

from instagramplugin.

ne0c0de avatar ne0c0de commented on June 7, 2024

Here's the sample cordova application that i created:

https://www.dropbox.com/s/g4c72huf8bvecyw/sample.zip?dl=0

It's including Cordova InAppBrowser plugin which is accessible from https://github.com/apache/cordova-plugin-inappbrowser and your Instagram Plugin.

You should run this on a real iphone device that have instagram application installed to reproduce the issue. Open the application and then click Open InAppBrowser button. It will open http://ajan.im/test.html url in an inappbrowser. When you click "Share on Instagram" link on that page, the error occurres.

Here's the latest debug lines when i tried it:

2016-02-11 16:52:59.607 HelloCordova[543:661599] Apache Cordova native platform version 3.6.3 is starting.
2016-02-11 16:52:59.609 HelloCordova[543:661599] Multi-tasking -> Device: YES, App: YES
2016-02-11 16:52:59.621 HelloCordova[543:661599] Unlimited access to network resources
2016-02-11 16:52:59.632 HelloCordova[543:661599]

Started backup to iCloud! Please be careful.
Your application might be rejected by Apple if you store too much data.
For more information please read "iOS Data Storage Guidelines" at:
https://developer.apple.com/icloud/documentation/data-storage/

2016-02-11 16:53:00.452 HelloCordova[543:661599] Resetting plugins due to page load.
2016-02-11 16:53:00.874 HelloCordova[543:661599] Finished load of: file:///var/mobile/Containers/Bundle/Application/C40F7281-253C-4329-A537-232E08EAAE91/HelloCordova.app/www/index.html
2016-02-11 16:53:29.921 HelloCordova[543:661599] Setting the WebView's frame to {{0, 0}, {320, 524}}
2016-02-11 16:53:29.921 HelloCordova[543:661599] Setting the WebView's frame to {{0, 0}, {320, 568}}
2016-02-11 16:53:29.936 HelloCordova[543:661599] THREAD WARNING: ['InAppBrowser'] took '87.792236' ms. Plugin should use a background thread.
2016-02-11 16:54:42.621 HelloCordova[543:661599] webView:didFailLoadWithError - -999: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2016-02-11 16:54:42.623 HelloCordova[543:661599] THREAD WARNING: ['InAppBrowser'] took '11.537109' ms. Plugin should use a background thread.
2016-02-11 16:54:44.631 HelloCordova[543:661599] open in instagram
2016-02-11 16:54:44.675 HelloCordova[543:661599] Warning: Attempt to present <_UIDocumentActivityViewController: 0x15d8e3000> on <MainViewController: 0x15d688950> whose view is not in the window hierarchy!
2016-02-11 16:54:44.676 HelloCordova[543:661599] THREAD WARNING: ['Instagram'] took '50.194092' ms. Plugin should use a background thread.

from instagramplugin.

ne0c0de avatar ne0c0de commented on June 7, 2024

i just find a workaround for the problem:

             `

ref.close();
setTimeout(function(){
console.log("before instagram lastUrl: " + lastUrl);
Instagram.share('insta', "", function (err) {
if (err != null && (err == "iini" || err.indexOf("No Activity found to handle Intent") != -1)){
console.log("instagram is not installed");
alert("Instagram not installed");
} else {
console.log("err on instagram share:");
console.log(err);
}
ref = cordova.InAppBrowser.open(lastUrl, '_blank', 'location=no,hardwareback=yes,toolbar=no');
//console.log("lastUrl: " + lastUrl);
});
},1000);
`

This will close the inappbrowser and open the share menu. After click on instagram button i'm opening the inappbrowser again.

But the new problem is, if i press the cancel button in share menu it will not trigger the callback function. And this cause the inappbrowser stay closed.

in this code:

`

  • (void) documentInteractionControllerDidDismissOpenInMenu: (UIDocumentInteractionController *) controller {
    CDVPluginResult *result;

    if (self.toInstagram) {
    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
    [self.commandDelegate sendPluginResult:result callbackId: self.callbackId];
    } else {
    result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageToErrorObject:2];
    [self.commandDelegate sendPluginResult:result callbackId: self.callbackId];
    }
    }
    `

this didn't trigger the callback function. How can i achieve this?

from instagramplugin.

ne0c0de avatar ne0c0de commented on June 7, 2024

any chance that you could test it?

from instagramplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.