i build an app using phonegap and trying to do a build as follows
Cordova ios build
it ends up with
VSKUMAR-mac:ios vskumar$ cordova build ios
Error: Source path does not exist: icon.png
my config.xml has an entry like
<icon src="icon.png" />
And the /www folder does have the default phonegap's image with name icon.png
My versions are:
VSKUMAR-mac:ios vskumar$ cordova -version
6.5.0
VSKUMAR-mac:ios vskumar$ phonegap version
6.4.6
<icon src="icon.png" />
comment this line in config.xml file. It will not reflect to your application.
Or else put the "icon.png" file in www folder.
It will solve your error.
Related
I tried to run the Adobe PhoneGap build for a hybrid App. It worked fine for Android but failed for iOS though everything was working OK earlier. I have updated the phonegap-version as the following:
<preference name='phonegap-version' value='cli-8.0.0' />
The error log shows the following:
copy splash.png ../../../../private/project/www/splash.png (new file)
TypeError: Cannot read property 'indexOf' of null
at parseWhitelistUrlForATS (/private/project/cordova/lib/prepare.js:1038:26)
at /private/project/cordova/lib/prepare.js:965:23
at Array.reduce (native)
at processAccessAndAllowNavigationEntries (/private/project/cordova/lib/prepare.js:956:10)
at writeATSEntries (/private/project/cordova/lib/prepare.js:1081:16)
at updateProject (/private/project/cordova/lib/prepare.js:217:15)
at /private/project/cordova/lib/prepare.js:59:20
at _fulfilled (/private/project/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/private/project/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/private/project/cordova/node_modules/q/q.js:816:13)
before ending. Please help.
I just changed the CLI version to cli-6.5.0
<preference name='phonegap-version' value='cli-6.5.0' />
and it worked. It looks higher version creates issues.
I'm attempting to use the new phonegap build with CLI 7.0.1
The build fails with this error:
The following build commands failed:
CompileAssetCatalog /Library/Developer/Xcode/DerivedData/Our_HNZC_Learning_space-ddfmniquktwfmabpvilymbvzreak/Build/Intermediates/ArchiveIntermediates/Our\ HNZC\ Learning\ space/InstallationBuildProductsLocation/Applications/Our\ HNZC\ Learning\ space.app Our\ HNZC\ Learning\ space/Images.xcassets
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/private/project/cordova/build-release.xcconfig,-workspace,Our HNZC Learning space.xcworkspace,-scheme,Our HNZC Learning space,-configuration,Release,-destination,generic/platform=iOS,-archivePath,Our HNZC Learning space.xcarchive,archive,CONFIGURATION_BUILD_DIR=/private/project/build/device,SHARED_PRECOMPS_DIR=/private/project/build/sharedpch
I've added these to config.png
<icon src="res/icon.png" />
<splash src="res/splash.png" />
And I've added this plugin
<plugin name="cordova-plugin-splashscreen" />
And the files are in the right place.
Splash works fine, Icon is causing the error
Not sure what the exact problem is based upon the info you provided.
A starting point would be to remove the splashscreen plugin and re-add it:
cordova plugin remove cordova-plugin-splashscreen
cordova plugin add cordova-plugin-splashscreen
cordova prepare
I would suggest using an Icon and Splashscreen generator such as this one: http://phonegap.appiq.software/
It does all of the hard work for you and gives you the exact code for your config.xml
I hope this is helpful.
I'm trying to figure out how to create a Cordova iOS plugin with the PressReader framework. I'm an iOS developer and have no experience with Cordova, this is why I hope to find some guidance here.
This is what i have done:
Created a plugin
Added the Objective-C classes to src/iOS
Added the PressReader_SDK.framework to src/iOS (is this the right place ?)
Edited the src/www/js file
Edited the plugin.xml with the following in the iOS platform:
<config-file target="config.xml" parent="/widget">
<feature name="Hello">
<param name="ios-package" value="HWPHello" />
</feature>
</config-file>
<resource-file src="src/ios/PressReader_SDK.framework"/>
<framework src="src/ios/PressReader_SDK.framework" custom="true" />
<framework src="Foundation.framework"/>
<framework src="UIKit.framework"/>
<header-file src="src/ios/HWPHello.h" target-dir="HelloPlugin"/>
<source-file src="src/ios/HWPHello.m" target-dir="HelloPlugin"/>
After this I've created a new Cordova app, added the plugin and then the iOS platform.
When opening the Xcode project from platforms/iOS I get the following Build error:
error: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.1.sdk/System/Library/Frameworks/PressReader_SDK.framework: No such file or directory
Trying to run the app from terminal (cordova run ios --device) gives me the following error:
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Andrei/desktop/hello/platforms/ios/cordova/build-debug.xcconfig,-workspace,Hello.xcworkspace,-scheme,Hello,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,Hello.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/Andrei/desktop/hello/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/Andrei/desktop/hello/platforms/ios/build/sharedpch
PS. the SDK does not seem to work on the simulator, and I need to test the app on a real device.
I installed cordova-plugin-googleplus plugin to login using google. After installing I run "cordova build andriod" in CLI, it was successful and apk file works fine for google login. Then for releasing the app I run "ant release" in platforms/android folder in CLI, then build failed with errors like " package com.google.android.gms.auth does not exist import com.google.android.gms.auth". Please give me the solution for this.
Thanks in advance.
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/252
Replace
<framework src="com.google.android.gms:play-services-plus:+" />
<framework src="com.google.android.gms:play-services-identity:+" />
with
<framework src="com.google.android.gms:play-services-plus:9.0.2" />
<framework src="com.google.android.gms:play-services-identity:9.0.2" />
in both plugin.xml as well as platforms/android/project.properties. In my case if I replace only plugin.xml then build.gradle was getting overridden with project.properties content and + version was being used instead of specific version
This is my first hybrid App. I'm getting about a dozen of these error message
C:\Users\Chloe\workspace\TypeFunctions>phonegap remote build ios
[phonegap] compressing the app...
rm: could not remove file (code EBUSY): C:\Users\Chloe\workspace\TypeFunctions\build\www/lib/images/icons-svg/mail-black.svg
There is only 1 search result on the entire web.
My target platform is Windows 8.1. I am using PhoneGap 5.4.0.
Strange, I tried it again, but now I got a different error. No mention of what the error was though. Terrible software.
C:\Users\Chloe\workspace\TypeFunctions>phonegap remote build ios
[phonegap] compressing the app...
skipping existing file: mail-black.svg
skipping existing file: tag-white.svg
skipping existing file: user-black.svg
skipping existing file: user-white.svg
[phonegap] uploading the app...
[phonegap] building the app...
[error] error occured while building the ios app
I managed to get a stack trace.
Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\Chloe\workspace\TypeFunctions\build'
at rethrow (fs.js:48:21)
at maybeCallback (fs.js:66:42)
at Object.fs.rmdir (fs.js:797:14)
at Object.module.exports.cleanup (C:\Users\Chloe\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build\lib\phonegap-build\create\zip.js:119:16)
at Object.callback (C:\Users\Chloe\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build\lib\phonegap-build\build\remote.js:71:21)
at Request._callback (C:\Users\Chloe\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build-api\lib\api.js:229:26)
at Request.self.callback (C:\Users\Chloe\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build-api\node_modules\request\main.js:122:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request. (C:\Users\Chloe\AppData\Roaming\npm\node_modules\phonegap\node_modules\phonegap-build-api\node_modules\request\main.js:655:16)
Additional Information
The EBUSY and ENOTEMPTY errors were caused by guard running. It might be possible to have it run with -w option.
I'm still getting the [error] error occured while building the ios app without reason. I'm using PhoneGap CLI and PhoneGap Build. I thought that part was obvious with the actual command line provided. The target platform was iOS. I thought that was given away by the command line too. The (default) platform tags in config.xml are
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<engine name="ios" spec="~3.9.2" />
The app was created with the jQuery template and command phonegap create myApp --template jquery-mobile-starter and then modified.