(config: Config, id: string)
| 118 | } |
| 119 | |
| 120 | export async function checkAppId(config: Config, id: string): Promise<string | null> { |
| 121 | if (!id) { |
| 122 | return `Invalid App ID. App ID is required and cannot be blank.`; |
| 123 | } |
| 124 | if (/^[a-zA-Z][\w]*(?:\.[a-zA-Z][\w]*)+$/.test(id.toLowerCase())) { |
| 125 | return null; |
| 126 | } |
| 127 | return ` |
| 128 | Invalid App ID "${id}". Your App ID must meet the following requirements to be valid on both iOS and Android: |
| 129 | - Must be in Java package form with no dashes (ex: com.example.app) |
| 130 | - It must have at least two segments (one or more dots). |
| 131 | - Each segment must start with a letter. |
| 132 | - All characters must be alphanumeric or an underscore [a-zA-Z][a-zA-Z0-9]+. |
| 133 | |
| 134 | If you would like to skip validation, run "cap init" with the "--skip-appid-validation" flag. |
| 135 | `; |
| 136 | } |
| 137 | |
| 138 | export async function checkAppName(config: Config, name: string): Promise<string | null> { |
| 139 | // We allow pretty much anything right now, have fun |
no outgoing calls
no test coverage detected