MCPcopy Create free account
hub / github.com/auth0/auth0-cli / extractInfoPlistBundleID

Function extractInfoPlistBundleID

internal/cli/quickstart_detect.go:581–592  ·  view source on GitHub ↗

extractInfoPlistBundleID extracts CFBundleIdentifier from Info.plist content. Returns empty string if absent or if the value is a build variable reference (e.g. "$(..)").

(content string)

Source from the content-addressed store, hash-verified

579// extractInfoPlistBundleID extracts CFBundleIdentifier from Info.plist content.
580// Returns empty string if absent or if the value is a build variable reference (e.g. "$(..)").
581func extractInfoPlistBundleID(content string) string {
582 matches := infoPlistBundleIDRegex.FindStringSubmatch(content)
583 if len(matches) < 2 {
584 return ""
585 }
586 id := strings.TrimSpace(matches[1])
587 // Skip Xcode variable references such as "$(PRODUCT_BUNDLE_IDENTIFIER)".
588 if strings.Contains(id, "$") {
589 return ""
590 }
591 return id
592}
593
594// gradleAppIDRegex matches applicationId in build.gradle (Groovy and Kotlin DSL forms).
595var gradleAppIDRegex = regexp.MustCompile(`applicationId\s*=?\s*["']([a-zA-Z][a-zA-Z0-9._-]*)["']`)

Callers 1

readIOSBundleIDFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected