Skip to content

Commit a1efebc

Browse files
committed
If buildNumber is null, default to 1. Fixes #118
1 parent 2a1cb47 commit a1efebc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/project/src/ios/project.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ export class IosProject extends PlatformProject {
184184
* Set the build number (aka the `CURRENT_PROJECT_VERSION`) for the given target and build.
185185
* If the `targetName` is null the main app target is used. If the `buildName` is null the value is set for both builds (Debug/Release);
186186
*/
187-
async setBuild(targetName: IosTargetName | null, buildName: IosBuildName | null, buildNumber: number) {
188-
this.pbxProject?.updateBuildProperty('CURRENT_PROJECT_VERSION', buildNumber, buildName, targetName);
187+
async setBuild(targetName: IosTargetName | null, buildName: IosBuildName | null, buildNumber: number | null) {
188+
this.pbxProject?.updateBuildProperty('CURRENT_PROJECT_VERSION', buildNumber ?? 1, buildName, targetName);
189189

190190
const file = await this.getInfoPlist(targetName, buildName ?? undefined);
191191
if (!file || !this.project?.config.ios?.path) {

0 commit comments

Comments
 (0)