readDotnetMobileBundleID extracts the element from .csproj content. Used for MAUI and .NET Mobile apps to generate callback URL guidance. Returns empty string if the element is absent.
(content string)
| 645 | // Used for MAUI and .NET Mobile apps to generate callback URL guidance. |
| 646 | // Returns empty string if the element is absent. |
| 647 | func readDotnetMobileBundleID(content string) string { |
| 648 | matches := csprojAppIDRegex.FindStringSubmatch(content) |
| 649 | if len(matches) < 2 { |
| 650 | return "" |
| 651 | } |
| 652 | return strings.TrimSpace(matches[1]) |
| 653 | } |
| 654 | |
| 655 | // csprojAppIDRegex matches the <ApplicationId> element in a .csproj file. |
| 656 | var csprojAppIDRegex = regexp.MustCompile(`<ApplicationId>\s*([a-zA-Z][a-zA-Z0-9._-]*)\s*</ApplicationId>`) |
no outgoing calls