Git Product home page Git Product logo

Comments (5)

matiassingers avatar matiassingers commented on September 23, 2024

The bundle identifiers you are checking with are for Android. On iOS for example Facebook's bundle identifier is com.facebook.Facebook, same with the Twitter bundle ID you are testing with.

from appavailability.

JohnMcAvinue avatar JohnMcAvinue commented on September 23, 2024

Sorry but I think you're wrong. As I said, I tried opening a link with fb://profile on IOS and it worked.

The documentation on https://github.com/ohh2ahh/AppAvailability also indicates that twitter is twitter://

from appavailability.

ohh2ahh avatar ohh2ahh commented on September 23, 2024

The URI schemes and bundle identifiers are correct. But are your if and else statements correct? Shouldn't they be somehow like this?

if(device.platform === 'iOS') {
    fbCheck = 'fb://';
    twitterCheck = "twitter://";
}
else {
    fbCheck = 'com.facebook.katana';
    twitterCheck = "com.twitter.android";
}

I've tested the plugin again with PhoneGap Build and couldn't find any errors. Here is the repository with a demo app showing AppAvailability in action:
https://github.com/ohh2ahh/AppAvailability-Demo-PhoneGap-Build

It runs successfully with:

  • PhoneGap 3.6.3
  • iPhone 6, iOS 8.1.3
  • Nexus 5, Android 5.0.1

from appavailability.

JohnMcAvinue avatar JohnMcAvinue commented on September 23, 2024

Thanks for sharing that project. There was nothing wrong with the if/else other than the case of the comparison being incorrect.

I have it working now, many thanks!

from appavailability.

matiassingers avatar matiassingers commented on September 23, 2024

@JohnMcAvinue sorry about that, completely didn't see your conditional the first time I looked at the example just saw com.facebook.katana and thought Android bundle ids.

from appavailability.

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.