We have a project that is in it's early stages of creation in Visual Studio 2017 using Apache Cordova. The app builds and runs in web browsers, android simulators/devices and a macbook pro.
The macbook pro is not a viable solution so are trying to get the remote build working on a Mac Mini. No matter what we couldn't get this working so made the decision to wipe the Mac Mini and start from scratch. After a hard drive wipe and fresh install of osx Sierra we are still experiencing the same problem.
I've copied below the log that is produced upon build on the Mac. In the folder the log is created in if I navigate to platforms and then open up the xcode project and run that it runs fine on the mac. I'm at a loss as to why this can't be run from VS2017 through remote tools.
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "remote/plugins/cordova-plugin-inappbrowser"
Copying plugin "remote/plugins/cordova-plugin-inappbrowser" => "/Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/plugins/cordova-plugin-inappbrowser"
No scripts found for hook "after_plugin_add".
No scripts found for hook "before_plugin_add".
Calling plugman.fetch on plugin "remote/plugins/cordova-plugin-whitelist"
Copying plugin "remote/plugins/cordova-plugin-whitelist" => "/Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/plugins/cordova-plugin-whitelist"
No scripts found for hook "after_plugin_add".
No scripts found for hook "before_plugin_add".
No version specified for cordova-plugin-vs-taco-support, retrieving version from config.xml
No version for cordova-plugin-vs-taco-support saved in config.xml
Attempting to use npm info for cordova-plugin-vs-taco-support to choose a compatible release
npm info for cordova-plugin-vs-taco-support did not contain any engine info. Fetching latest release
Calling plugman.fetch on plugin "cordova-plugin-vs-taco-support"
Fetching plugin "cordova-plugin-vs-taco-support" via npm
Copying plugin "/Users/macmini/.npm/cordova-plugin-vs-taco-support/0.2.3/package" => "/Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/plugins/cordova-plugin-vs-taco-support"
No scripts found for hook "after_plugin_add".
cordova platform add ios
Executing script found in plugin cordova-plugin-vs-taco-support for hook "before_platform_add": plugins/cordova-plugin-vs-taco-support/hooks/hook-execute-bit-fix.js
Executing script found in plugin cordova-plugin-vs-taco-support for hook "before_platform_add": plugins/cordova-plugin-vs-taco-support/hooks/hook-remove-plugin-json.js
No version supplied. Retrieving version from config.xml...
Adding ios project...
PlatformApi successfully found for platform ios
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.cordova.myappd7d4a1
Name: SeaComply.Cordova
Copying iOS template project to /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios
iOS project created with cordova-ios#4.2.0
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
Generating platform-specific config.xml from defaults for iOS at /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/SeaComply.Cordova/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
mkdir platforms/ios/www/cordova-js-src
copy platforms/ios/platform_www/cordova-js-src/exec.js platforms/ios/www/cordova-js-src/exec.js (new file)
copy platforms/ios/platform_www/cordova-js-src/platform.js platforms/ios/www/cordova-js-src/platform.js (new file)
copy platforms/ios/platform_www/cordova.js platforms/ios/www/cordova.js (updated file)
copy www/css/index.css platforms/ios/www/css/index.css (updated file)
mkdir platforms/ios/www/dist
copy www/dist/674f50d287a8c48dc19ba404d20fe713.eot platforms/ios/www/dist/674f50d287a8c48dc19ba404d20fe713.eot (new file)
copy www/dist/89889688147bd7575d6327160d64e760.svg platforms/ios/www/dist/89889688147bd7575d6327160d64e760.svg (new file)
copy www/dist/912ec66d7572ff821749319396470bde.svg platforms/ios/www/dist/912ec66d7572ff821749319396470bde.svg (new file)
copy www/dist/b06871f281fee6b241d60582ae9369b9.ttf platforms/ios/www/dist/b06871f281fee6b241d60582ae9369b9.ttf (new file)
copy www/dist/main-client.js platforms/ios/www/dist/main-client.js (new file)
copy www/dist/main-client.js.map platforms/ios/www/dist/main-client.js.map (new file)
copy www/dist/vendor-manifest.json platforms/ios/www/dist/vendor-manifest.json (new file)
copy www/dist/vendor.css platforms/ios/www/dist/vendor.css (new file)
copy www/dist/vendor.css.map platforms/ios/www/dist/vendor.css.map (new file)
copy www/dist/vendor.js platforms/ios/www/dist/vendor.js (new file)
copy www/dist/vendor.js.map platforms/ios/www/dist/vendor.js.map (new file)
mkdir platforms/ios/www/images
copy www/images/cordova.png platforms/ios/www/images/cordova.png (new file)
rmdir platforms/ios/www/img (no source)
delete platforms/ios/www/img/logo.png (no source)
copy www/index.html platforms/ios/www/index.html (updated file)
rmdir platforms/ios/www/js (no source)
delete platforms/ios/www/js/index.js (no source)
mkdir platforms/ios/www/scripts
copy www/scripts/application.js platforms/ios/www/scripts/application.js (new file)
copy www/scripts/application.js.map platforms/ios/www/scripts/application.js.map (new file)
copy www/scripts/startup.js platforms/ios/www/scripts/startup.js (new file)
copy www/scripts/startup.js.map platforms/ios/www/scripts/startup.js.map (new file)
Wrote out iOS Bundle Identifier "io.cordova.myappd7d4a1" and iOS Bundle Version "1.0.0" to /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/SeaComply.Cordova/SeaComply.Cordova-Info.plist
iOS Product Name has not changed (still "SeaComply.Cordova")
Updating icons at platforms/ios/SeaComply.Cordova/Images.xcassets/AppIcon.appiconset/
copy res/icons/ios/icon-60.png platforms/ios/SeaComply.Cordova/Images.xcassets/AppIcon.appiconset/icon-60.png (new file)
Updating splash screens at platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/
copy res/screens/ios/screen-iphone-568h-2x.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-568h#2x~iphone.png (updated file)
copy res/screens/ios/screen-iphone-portrait-667h.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-667h.png (updated file)
copy res/screens/ios/screen-iphone-portrait-736h.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-736h.png (updated file)
copy res/screens/ios/screen-iphone-landscape-736h.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png (updated file)
copy res/screens/ios/screen-ipad-landscape-2x.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-Landscape#2x~ipad.png (updated file)
copy res/screens/ios/screen-ipad-landscape.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png (updated file)
copy res/screens/ios/screen-ipad-portrait-2x.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-Portrait#2x~ipad.png (updated file)
copy res/screens/ios/screen-ipad-portrait.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png (updated file)
copy res/screens/ios/screen-iphone-portrait-2x.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default#2x~iphone.png (updated file)
copy res/screens/ios/screen-iphone-portrait.png platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/Default~iphone.png (updated file)
Prepared iOS project successfully
Installing plugin "cordova-plugin-inappbrowser" following successful platform add of ios
Found variables for "cordova-plugin-inappbrowser". Processing as cli_variables.
Installing "cordova-plugin-inappbrowser" for ios
Running command: /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/cordova/version
Command finished with error code 0: /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/cordova/version
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-inappbrowser on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-inappbrowser" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
Install complete for cordova-plugin-inappbrowser on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-inappbrowser on ios platform only.
No scripts found for hook "after_plugin_install".
Installing plugin "cordova-plugin-vs-taco-support" following successful platform add of ios
Found variables for "cordova-plugin-vs-taco-support". Processing as cli_variables.
Installing "cordova-plugin-vs-taco-support" for ios
Running command: /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/cordova/version
Command finished with error code 0: /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/cordova/version
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-vs-taco-support on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-vs-taco-support" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
Install complete for cordova-plugin-vs-taco-support on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-vs-taco-support on ios platform only.
No scripts found for hook "after_plugin_install".
Installing plugin "cordova-plugin-whitelist" following successful platform add of ios
Found variables for "cordova-plugin-whitelist". Processing as cli_variables.
Installing "cordova-plugin-whitelist" for ios
Running command: /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/cordova/version
Command finished with error code 0: /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/cordova/version
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-whitelist" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
Install complete for cordova-plugin-whitelist on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-whitelist on ios platform only.
No scripts found for hook "after_plugin_install".
Executing script found in plugin cordova-plugin-vs-taco-support for hook "before_prepare": plugins/cordova-plugin-vs-taco-support/hooks/hook-execute-bit-fix.js
Resolving module name for q => q
Executing script found in plugin cordova-plugin-vs-taco-support for hook "before_prepare": plugins/cordova-plugin-vs-taco-support/hooks/hook-res-native.js
Processing res/native for ios
Checking config.xml for saved platforms that haven't been added to the project
Checking for any plugins added to the project that have not been installed in ios platform
No differences found between plugins added to project and installed in ios platform. Continuing...
Generating platform-specific config.xml from defaults for iOS at /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/SeaComply.Cordova/config.xml
Merging project's config.xml into platform-specific iOS config.xml
Merging and updating files from [www, platforms/ios/platform_www] to platforms/ios/www
copy platforms/ios/platform_www/cordova_plugins.js platforms/ios/www/cordova_plugins.js (updated file)
copy platforms/ios/platform_www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js platforms/ios/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js (updated file)
Wrote out iOS Bundle Identifier "io.cordova.myappd7d4a1" and iOS Bundle Version "1.0.0" to /Users/macmini/.taco_home/remote-builds/taco-remote/builds/1794/cordovaApp/platforms/ios/SeaComply.Cordova/SeaComply.Cordova-Info.plist
iOS Product Name has not changed (still "SeaComply.Cordova")
Updating icons at platforms/ios/SeaComply.Cordova/Images.xcassets/AppIcon.appiconset/
Updating splash screens at platforms/ios/SeaComply.Cordova/Images.xcassets/LaunchImage.launchimage/
Prepared iOS project successfully
No scripts found for hook "after_prepare".
Checking config.xml for saved plugins that haven't been added to the project
Saving ios#4.2.0 into platforms.json
No scripts found for hook "after_platform_add".
Failed to build app for buildNumber 1794:
Thanks.
Related
I am trying to simulate a project with ionic using the command ionic emulate ios. I have installed xcode last version on mac Sierra. But no work. this is the error:
** BUILD SUCCEEDED **
No target specified for emulator. Deploying to iPhone-SE, 10.2 simulator
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=163):
Unable to lookup in current state: Shutdown
Error: ENOENT: no such file or directory, stat '/var/root/Library/Logs/CoreSimulator/4A052961-F773-4156-9D6C-76F137CC761B/system.log'
I found this solution(https://forums.developer.apple.com/thread/66665) but no work for me.
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/
Open a Project within Xcode
Cordova for iOS projects can be opened in Xcode. This can be useful if you wish to use Xcode built in debugging/profiling tools or if you are developing iOS plugins. Please note that when opening your project in Xcode, it is recommended that you do NOT edit your code in the IDE. This will edit the code in the platforms folder of your project (not www), and changes are liable to be overwritten. Instead, edit the www folder and copy over your changes by running cordova build.
Plugin developers wishing to edit their native code in the IDE should use the --link flag when adding their plugin to the project via cordova plugin add. This will link the files so that changes to the plugin files in the platforms folder are reflected in your plugin's source folder (and vice versa).
Once the ios platform is added to your project and built using cordova build, you can open it from within Xcode. Double-click to open the ${PROJECT_NAME}/platforms/ios/${PROJECT_NAME}.xcodeproj file. The screen should look like this:
https://cordova.apache.org/static/img/guide/platforms/ios/helloworld_project.png
Then follow the instructions to deploy to a simulator:
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#deploying-to-simulator
You will be able to see errors more clearly.
In my case it was the problem of an unmatched resource file. I simply deleted it.
After this, I tried:
sudo chown -R $USER:$GROUP ~/.npm sudo chown -R $USER:$GROUP ~/.config
in terminal and was able to run the app in a simulator
If I run "Cordova platform rm iOS" command through terminal, Cordova CLI is also removing iOS folder from merges directory. Phonegap's documentation says that Platform-specific web assets (HTML, CSS and JavaScript files) are contained within appropriate subfolders in merges directory. What am I doing wrong?
This issue has been fixed as part of 3.3.1-0.2.0 merge to master branch Cordova CLI:
https://github.com/apache/cordova-cli/pull/118
In order to get latest version of cordova CLI , please follow "Installing from Master" instructions on following URL:
https://github.com/apache/cordova-cli
Hi I am new to IOS and Xcode. Can we use config.xml in IOS xcode? If we are using where can we place the config.xml. While creating my project I did not get config.xml. Is it will be a problem?
Using the latest versions of cordova tipically update the required files (config.xml) for you when you use the CLI with command
Cordova plugin add
The documentation explain specific tweaks to the config.xml
http://cordova.apache.org/docs/en/3.1.0/config_ref_index.md.html#The%20config.xml%20File
From the doc
For projects created with the Cordova CLI (described in The Command-line Interface The Command-line Interface), this file can be found in the top-level www directory. Using the CLI to build a project regenerates versions of this file in various subdirectories within platforms .Ifyou usetheCLI to create a project, but then shift your workflow to an SDK, the platform-specific file serves as a source.
I am trying to install the cordova console.log plugin.
when i am trying to install it using the command line using:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git
I am running it from the path of the root application path
the structure of the folder is:
projName
|-- --project
|-- projName
|-- cordova
|-- CordovaLib
|-- projName.xcodeproj
|-- plugin
And the error i receive in the command line is
[Error: Current working directory is not a Cordova-based project.]
i should mention that i build the cordova project manually using imports of the frameworks because in the xcode new project window there was not Cordova/Phonegap new project option.
I am using xCode 5.0.1 and cordova 3.1.0
The error you get is self-explanatory, it is because you have not created a cordova project as it must be created. Keep reading to solve the problem.
Cordova basic project preparation steps
Based on my comment and your answer, you should follow the cordova workflow for creating projects using the CLI (command line interface), it is strongly recommended to avoid unnecessary problems, and the steps are not hard to follow.
Please follow the steps described here (official doc), read it fully, it will save you more time later if you read it:
http://cordova.apache.org/docs/en/3.2.0/guide_cli_index.md.html#The%20Command-Line%20Interface
In brief the steps are:
Install node.js
Install cordova using npm
Create a cordova project / app using the CLI
Add the desired platform to the project (android, ios, etc, as needed)
Work on your project
Add cordova plugins as necessary (for example if you need notifications add the notificacion plugin)
Build the project
Test of device or emulator (in your case iPhone, iPad simulator)
iOS Platform Guide
Also check the iOS Platform Guide completely, it is very helpful, explain additional instructions to prepare and work with XCode.
http://cordova.apache.org/docs/en/3.2.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide
Plugins
For each plugin in the API reference you will find instructions to install them using the CLI, as well as to "uninstall" them.
Only install the plugins you will need
Just for reference, the code to install notifications-dialogs plugin using the terminal (run the command inside your project folder):
$ cordova plugin rm org.apache.cordova.dialogs
On the other hand, the easier way to solve the problem is create the new project following the noted steps and later just add your existing code or files to the proper folders, as well as add the required plugins, not that difficult.
I am trying to build a BlackBerry 7 and earlier project that uses the WebWorks SDK using Phonegap 2.9; but the build doesn't generate the StandardInstall.zip file as it's supposed to.
The project I'm trying to build is the example app found in the Phonegap 2.9 download (phonegap-2.9.0\lib\blackberry\bbos\example).
I followed the instructions in the Phonegap documentation and there is an overview of my environment:
My OS is Windows XP, I've got JDK, ANT and BlackBerry device manager installed. I've also installed the BlackBerry Webworks SDK and I've setup my Signing Keys (sigtool.csk and sigtool.db are in the bin folder of the webworks installation).
I also updated the project.properties file as explained in the documentation.
When I try to build the app, It doesn't print any error message, but the OTAInstall and StandardInstall folders are not generated (all I get is the zipped application folder and a widget folder).
I also tried deploying to simulator and to device, the errors thrown confirm just that the build step doesn't generate the files it should.
Screenshots: http://i.stack.imgur.com/XpN4M.png
Solutions I already tried:
JDK version problem
I downgraded JDK to 1.6.0_30 version (it seems that the Webworks SDK doesn't work with upper versions); but it didn't change anything.
White spaces
I also tried to avoid white spaces in paths like advised in other posts but it doesn't work:
C:
├ \ant
├ \java
└ \webworks
I don't know what else to do, any help would be much appreciated !
To make a blackberry phonegap project, the things you need are:
Phonegap (cordova libs)
BlackBerry WebWorks SDK
Ant, through which you will build your project.(Also add 'ANT' in you environment variables).
The steps to create a phonegap build:
Open the phonegap sample that came with it. Follow the location -
phonegap-2.3.0\lib\blackberry\sample
Copy cordova folder as you see the sample folder
Copy lib and www folder also. The lib folder contains the cordova library. The www folder is the only place for your files.
It contains your html, css, js and the config.xml
Copy blackberry.xml, build.xml and project.properties files.(change the properties in these files as per your project configurations)
'Build' folder is created once you run the script 'ant blackberry build'(To build the project) or 'ant blackberry load-simulator'(Build and run on simulator) or 'ant blackberry load-device'
Once you have built the project you can run it on device using the .cod files.
When you run the above build scripts you get the build folder in your PhonegapBlackberry project which looks like:
Setting the correct Java jdk home path in bbwp.properties file of my <BlackBerry SDK>/bin folder works for me.
Thanks,
prodeveloper.