2.22 Create iOS app stops at 60% (Again)

Just starting out? Need help? Post your questions and find answers here.
hoerbie
Posts: 100
Joined: Sun Mar 17, 2019 5:51 pm
Location: DE/BY/MUC

2.22 Create iOS app stops at 60% (Again)

Post by hoerbie »

Hi,

yesterday I tested/debugged a lot with our iOS app because of some problems, the app only makes on iOS but not on Android. But this is another construction site....

As I couldn't solve the problem in the app, I tried the new "Check XCode and Cordova Setup" button again, that last time solved my create app problems at 60%.

But this time it simply destroyed everything, and I was again on the titled problem, I could't build iOS apps from SB 2.22, because it stopped at 60%.

When I clicked the "Check"-button it told about missing Xcode select, although actual Xcode 11.2 and command line tools were installed, and everything in create app worked fine, building and deploying. So I tried to install the Xcode command line tools as suggested, but I think it installed 11.0 and not 11.2, because while installing, the Apple "Software Update" dialog popped up and told about updates for command line tools 11.0 AND 11.2.

After this I used "Check"-button again and now it installed again Cordova 9.0.0 and installed/updated some tools, and told me, that everything is fine now. But SB now no longer build the app, it simply stopped again at 60%.

After this I used the "Software Update", that now only wanted to update the command line tools 11.2, so I did it. Then I tried the "Check"-button again, and it told me again that everything is fine. But again, SB stopped building the app at 60%.

So today I looked at the actual install-cordova.sh script and used it step by step in terminal, and I found the following problems:

1. The script doesn't do anything with "cordova-ios" which I think is needed? After the command

Code: Select all

sudo sh -c "npm update -g cordova"
I added

Code: Select all

sudo sh -c "npm install -g cordova-ios"
and then

Code: Select all

sudo sh -c "npm update -g cordova-ios"
, this updated/installed cordova-ios from 5.0.0 to 5.0.1


2. The command

Code: Select all

sudo sh -c "npm install -g ios-deploy --unsafe-perm=true"
throws an error

Code: Select all

ld: framework not found MobileDevice
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

The following build commands failed:
	Ld /usr/local/lib/node_modules/ios-deploy/build/Release/ios-deploy normal x86_64
(1 failure)
npm ERR! code ELIFECYCLE
npm ERR! errno 65
npm ERR! ios-deploy@1.9.4 preinstall: `./src/scripts/check_reqs.js && xcodebuild`
npm ERR! Exit status 65
npm ERR! 
npm ERR! Failed at the ios-deploy@1.9.4 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/<myusername>/.npm/_logs/2019-11-09T09_18_56_449Z-debug.log
Googling this it seems that there are some problems with iOS-deploy and macOS 10.15 Catalina, some people solved it installing a beta version with

Code: Select all

sudo sh -c "npm install -g ios-deploy@beta --unsafe-perm=true"
but this doesn't work at my Mac. But please remember, that there are problems with deploy.

3. The SB script is not doing a real check, because it only generates a blank Cordova app, adds the iOS platform and adds two plugins, but the command

Code: Select all

cordova build ios
is simply missing. So this is not a real check.

So far, so bad, but doing all above I can build an app directly with Cordova.

But when I used the "Create App" on the "iOS" tab yesterday, I had the iPad plugged to the Mac and had the "Automatically upload on USB connected device" switch on, and it stopped at 60%.

Today now I found out the following:
1. I had the "Deploy" switch in SB off, but the iPad plugged to the Mac, and create app stopped at 60%.
2. When I unplug the iPad and have the switch off, the create app works to 100% and saves an .ipa file!
3. Having the "Deploy" switch on but no iPad plugged, the create app works to 100% and saves an .ipa file, but SB gives a

Code: Select all

Javascript optimizer has failed (Java is required).
error message, although I don't have optimization on, it here simply should say, that deploying hasn't worked.

Although my actual problems seem to come from the "ios-deploy" tools and Catalina, there are some problems with the install-cordova.sh script, and still the problems with the not understandable "create app stops at 60%". And why can SB create an app without plugged iPad, but not with plugged iPad?

So here is my buglist or wishlist for create app:

1. Please have again a look at the install-cordova.sh script, it seems not to be complete, and ignoring the npm install errors (for example from "ios-deploy") isn't helpful for a "check" script.

2. Please don't simply say "App build failed". At this point it would be really helpful for debugging, when SB wouldn't delete its reached state and the temporary build directory, but give the option to directly open this directory in Finder, so that the user can work his way from there on in debugging/testing/solving.

3. Or maybe integrate the functionality to just put everything of Cordova and SB together in one (temporary) dir and then let the user work from there with "cordova build ios" or anything other. This also would be interesting when looking at Cordova-Electron....

4. Please give a full working example in building an iOS app with command line sbcompiler, the new verbose command is a good idea, but is only helpful, if the user can try to build an app this way, but the documentation lacks a lot of needed information. I'm not the only one, who didn't manage to use the sbcompiler at command line (please see old thread).

5. For the future it would be nice to deploy an iOS app to the simulator, like Cordova can do.

A long text for now, I hope it helps, that SB some day can use its potential,
greetings from Hoerbie