Build for iOS: build.json missing

I followed the instructions on the manual but can't seem to build my iOS app. The error is that build.json is missing. The .ipa is not generated in turn. I can open the xcworkspace and change the team manually, but the resulting app is stuck at "device is ready" in a Cordova launch screen. I guess it's not built completely.

Anyone any idea why the build.json is not generated?


This is the console log:

Objective-J.js:9388 COMMAND LINE:
Objective-J.js:9388 cordova create "test1live2d" "com.example.game" "Exit 23"
(unknown) Creating a new cordova project.
(unknown)

(unknown) Finished Creating Project...
(unknown)
Objective-J.js:9388 COMMAND LINE:
Objective-J.js:9388 /Users/usernamechanged/Library/Application Support/Steam/steamapps/common/Visual Novel Maker/tools/node/bin/node /Users/ingokiem/Library/Application Support/Steam/steamapps/common/Visual Novel Maker/scripts/package_ios_cordova.js "/Users/ingokiem/test1live2d" "/Users/ingokiem/Library/Application Support/Steam/steamapps/common/Visual Novel Maker" "/Users/ingokiem/test1live2d/build/test1live2d" "JTdCJTBBJT[………]JTdE"
(unknown) /bin/sh: /Users/usernamechanged/Library/Application: No such file or directory

(unknown) Finished Packaging...
(unknown) /bin/sh: /Users/usernamechanged/Library/Application: No such file or directory

Objective-J.js:9388 COMMAND LINE:
Objective-J.js:9388 cordova platform add ios
(unknown) Using cordova-fetch for cordova-ios@~4.5.4
(unknown)

(unknown) Adding ios project...
(unknown)

(unknown) Creating Cordova project for the iOS platform:

(unknown) Path: platforms/ios
Package: com.example.game
Name: Exit 23

(unknown) iOS project created with [email protected]

(unknown) Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project

(unknown) Installing "cordova-plugin-whitelist" for ios

(unknown) Adding cordova-plugin-whitelist to package.json

(unknown) Saved plugin info for "cordova-plugin-whitelist" to config.xml

(unknown) --save flag or autosave detected
Saving ios@~4.5.4 into config.xml file ...
(unknown)

(unknown) Finished Adding Platforms...
(unknown)
Objective-J.js:9388 COMMAND LINE:
Objective-J.js:9388 cordova plugin add cordova-plugin-file
(unknown) Installing "cordova-plugin-file" for ios
(unknown)

(unknown) Adding cordova-plugin-file to package.json
(unknown)

(unknown) Saved plugin info for "cordova-plugin-file" to config.xml

(unknown) Finished Adding Plugins...
(unknown)
Objective-J.js:9388 COMMAND LINE:
Objective-J.js:9388 cordova plugin add cordova-plugin-wkwebview-engine
(unknown) Installing "cordova-plugin-wkwebview-engine" for ios
(unknown)

(unknown) Adding cordova-plugin-wkwebview-engine to package.json
(unknown)

(unknown) Saved plugin info for "cordova-plugin-wkwebview-engine" to config.xml

(unknown) Finished Adding Plugins...
(unknown)
Objective-J.js:9388 COMMAND LINE:
Objective-J.js:9388 cordova build ios --buildConfig build.json
(unknown) (node:3264) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Build config file does not exist:build.json

(unknown) (node:3264) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

(unknown) Finished Building...
(unknown) (node:3264) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Build config file does not exist:build.json
(node:3264) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Hi, this:

(unknown) /bin/sh: /Users/usernamechanged/Library/Application: No such file or directory

is the issue I think. It looks the program breaks on the space in "Application Support" which is weird since those paths are actually passed in a way that this can't happen. That why the build.json is not there. I will investigate that on my Mac to see if I can reproduce this issue and come back to you soon.
Hi, even if I can't reproduce the issue on my Mac, I have an idea what it could be. So please do the following:

1. In VN Maker in Menubar go Visual Novel Maker > Preferences > Application
2. Click on the Builds tab
3. Double Click "iOS (Cordova)"
4. Double Click "Packaging..."
5. Replace the Command Line with the following one:
Code:
"$(APP_DIR)/tools/node/bin/node" "$(APP_DIR)/scripts/package_ios_cordova.js" "$(PROJECT_DIR)" "$(APP_DIR)" "$(OUTPUT_DIR)" "$(PACKAGE_INFO)" "$(PARAMS)"

6. Click OK on everything, save your project and try again.

Let me know if it works now and if not please check if you get a different error this time.
Almost there.

After changing the line you described, I got a different error:
(node:1808) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): ios-deploy was not found. Please download, build and install version 1.9.2 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'

'npm install -g ios-deploy' did not work, error: "[email protected] preinstall: `./src/scripts/check_reqs.js && xcodebuild"

Solution found in this discussion: https://github.com/phonegap/ios-deploy/issues/109

sudo npm install --global --unsafe-perm ios-deploy

Now I get a running xcworkspace. But I have to resign it in Xcode with automatic provisioning profiles.

If I only specify the correct development team in VNMaker Preferences > Project > iOS Deployment, I almost get it to compile the IPA. The relevant error message is:

Code Signing Error: No profiles for 'com.example.game' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.game'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

How do I set VNMaker to pass -allowProvisioningUpdates to xcodebuild?
Hi, you very close. I think there are two options:

1. You have to create a provisioning profile for your bundle identifier and make sure that the project's bundle identifier matches with it. Right now, you still use com.example.game. So if you are a registered iOS Developer, just go to the Provisioning Portal an create a wildcard bundle identifier like com.mycompany.* or something and then download the provisioning profile, install and put the UID of it into the project preferences. But the requirement for that is that you already paid the $99 to apple.

You can reach it here: https://developer.apple.com/account
However, it is only available if you already joined the iOS Developer Program and paid the $99 to Apple.

2. Apple finally allowed to develop and test apps directly on the device even you haven't paid the $99 dollar yet but with some limitations. Its a new feature and it looks like Cordova doesn't fully supports that yet. Even if I pass the build-flag it doesn't work for me. But you can try it:

1. Open Visual Novel Maker > Preferences > Application
2. Switch to Build tab
3. Double Click iOS (Cordova)
4. Double Click "Building..."
5. Replace the command line with:

Code:
cordova build ios --buildFlag="-allowProvisioningUpdates" --buildConfig build.json

However, that might not work out. In that case, you can try to open the generated project file in Xcode and build & run your project from there. Or just join the iOS Developer Program for $99 since you have to do that anyway at some point.


Let me know if that helps you out.

Original thread: https://forums.rpgmakerweb.com/threads/build-for-ios-build-json-missing.90342/