ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
11.31k stars 962 forks source link

[Bug]: isNativePlatform not working as expected #7387

Closed aliforouzan closed 1 month ago

aliforouzan commented 1 month ago

Capacitor Version

"@capacitor/android": "^5.7.2", "@capacitor/browser": "^5.2.0", "@capacitor/core": "^5.7.2",

Other API Details

npm --version
9.7.2
node --version
v20.4.0

Platforms Affected

Current Behavior

in an Android device calling isNativePlatform returns false and getPlatform returns 'web'

Expected Behavior

in an Android device calling isNativePlatform returns true and getPlatform returns 'android'

Project Reproduction

no link

Additional Information

I use capacitor on a Next.js project

ionitron-bot[bot] commented 1 month ago

This issue needs more information before it can be addressed. In particular, the reporter needs to provide a minimal sample app that demonstrates the issue. If no sample app is provided within 15 days, the issue will be closed. Please see the Contributing Guide for how to create a Sample App. Thanks! Ionitron 💙

Ionitron commented 1 month ago

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day! Ionitron 💙

ionitron-bot[bot] commented 1 week ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.