Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core: Add debug flag and rename Platform to AppPlatform #422

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

ksharma-xyz
Copy link
Owner

@ksharma-xyz ksharma-xyz commented Dec 4, 2024

TL;DR

Added debug flag detection and improved platform-specific information handling across Android and iOS.

What changed?

  • Renamed Platform interface to AppPlatform and getPlatform() to getAppPlatform()
  • Added isDebug() function to detect debug builds on both platforms
  • Enabled BuildConfig for Android to support debug detection
  • Updated LocalPlatformTypeProvider to use staticCompositionLocalOf with proper platform initialization
  • Implemented platform-specific debug detection (BuildConfig.DEBUG for Android, Platform.isDebugBinary for iOS)

How to test?

  1. Build and run the app in both debug and release configurations
  2. Verify that isDebug() returns the correct boolean value for each build type
  3. Confirm platform information is correctly displayed
  4. Check that platform-specific features work as expected on both Android and iOS

Why make this change?

To provide a more robust way to detect debug builds across platforms and improve the platform-specific information architecture. This enables better debugging capabilities and platform-specific optimizations in the codebase.

Copy link
Owner Author

ksharma-xyz commented Dec 4, 2024

@ksharma-xyz ksharma-xyz changed the title Add isDebug method to AppPlatform Core: Add debug flag and rename Platform to AppPlatform Dec 4, 2024
@ksharma-xyz ksharma-xyz marked this pull request as ready for review December 4, 2024 09:40
@ksharma-xyz ksharma-xyz merged commit 9f04ee0 into main Dec 4, 2024
2 checks passed
Copy link
Owner Author

Merge activity

  • Dec 4, 4:47 AM EST: A user merged this pull request with Graphite.

@ksharma-xyz ksharma-xyz deleted the 12-04-add_isdebug_method_to_appplatform branch December 4, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant