nordnet / cordova-hot-code-push-local-dev-addon

[DEPRECATED] - Cordova plugin that adds local development feature to the Hot Code Push plugin.
https://github.com/nordnet/cordova-hot-code-push-local-dev-addon/issues/29
MIT License
24 stars 30 forks source link

When installed with cordova-plugin-camera we get error code 65 for command: xcodebuild. #14

Closed screendriver closed 7 years ago

screendriver commented 7 years ago
$ cordova plugin add cordova-hot-code-push-local-dev-addon
$ cordova build ios

gives me on macOS Sierra:

CHCP Local Development Add-on:
    Config-file is not set, local-development mode is enabled by default.
    Setting config-file to local server: https://6d322d08.ngrok.io/chcp.json
    iOS bundle version set to 2
Swift support activation hook:
    iOS project now has deployment target set to: 8.0
    iOS project option EMBEDDED_CONTENT_CONTAINS_SWIFT set as: YES
    iOS project Runpath Search Paths set to: @executable_path/Frameworks
    iOS project "Use Legacy Swift Language Version" set to: NO
    Injected swift header My_Project-Swift.h into plugin's main header.
CHCP plugin after prepare hook:
    config-file preference is not set.
Reading build config file:
Building project: /Users/me/Development/my-project/platforms/ios/My Project.xcodeproj
        Configuration: Debug
        Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/me/Development/my-project/platforms/ios/build/emulator
    SDKROOT = iphonesimulator10.0
    SHARED_PRECOMPS_DIR = /Users/me/Development/my-project/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/me/Development/my-project/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    IPHONEOS_DEPLOYMENT_TARGET = 8.0
    OTHER_LDFLAGS = -ObjC
    PROVISIONING_PROFILE = e1e4c804-c279-4aaa-a069-1cbdf2d51bd4
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h
    TARGETED_DEVICE_FAMILY = 1,2

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET My Project OF PROJECT My Project WITH CONFIGURATION Debug ===

Check dependencies

Write auxiliary files
write-file /Users/me/Development/my-project/platforms/ios/build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/My\ Project.hmap
write-file /Users/me/Development/my-project/platforms/ios/build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/My\ Project-project-headers.hmap
write-file /Users/me/Development/my-project/platforms/ios/build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/Objects-normal/i386/My\ Project.LinkFileList

PhaseScriptExecution Copy\ www\ directory build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/Script-304B58A110DAC018002A0835.sh
    cd /Users/me/Development/my-project/platforms/ios
    /bin/sh -c \"/Users/me/Development/my-project/platforms/ios/build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/Script-304B58A110DAC018002A0835.sh\"

ProcessInfoPlistFile build/emulator/My\ Project.app/Info.plist My\ Project/My\ Project-Info.plist
    cd /Users/me/Development/my-project/platforms/ios
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/me/.nvm/versions/node/v6.6.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Users/me/Library/Android/sdk/tools:/Users/me/Library/Android/sdk/platform-tools"
    builtin-infoPlistUtility /Users/me/Development/my-project/platforms/ios/My\ Project/My\ Project-Info.plist -genpkginfo /Users/me/Development/my-project/platforms/ios/build/emulator/My\ Project.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/me/Development/my-project/platforms/ios/build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/MainViewController-PartialInfo.plist -additionalcontentfile /Users/me/Development/my-project/platforms/ios/build/My\ Project.build/Debug-iphonesimulator/My\ Project.build/assetcatalog_generated_info.plist -o /Users/me/Development/my-project/platforms/ios/build/emulator/My\ Project.app/Info.plist
error: couldn't parse contents of '/Users/me/Development/my-project/platforms/ios/My Project/My Project-Info.plist': The data couldn’t be read because it isn’t in the correct format.

** BUILD FAILED **

The following build commands failed:
        ProcessInfoPlistFile build/emulator/My\ Project.app/Info.plist My\ Project/My\ Project-Info.plist
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/me/Development/my-project/platforms/ios/cordova/build-debug.xcconfig,-project,My Project.xcodeproj,-target,My Project,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,build,CONFIGURATION_BUILD_DIR=/Users/me/Development/my-project/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/me/Development/my-project/platforms/ios/build/sharedpch
nikDemyankov commented 7 years ago

What version of Xcode you are using?

Try to open platforms/ios/My Project.xcodeproj file in Xcode. It should not ask you to "Convert Swift code to new format", but if it will - don't do that. Run the "build" from it (cmd + B) and see what errors it will display. Post the screen here, please, if you can.

screendriver commented 7 years ago

Xcode Version 8.0 (8A218a

I created a completely new project and it works 😳

I will clean my existing project and try to set it up new. It seems that in my project is something that is cached or something. Thank you for the quick response 👍

screendriver commented 7 years ago

Update: I found out that when you add cordova-plugin-camera your cordova-hot-code-push-local-dev-addon will not build anymore. I can use either cordova-plugin-camera or cordova-hot-code-push-local-dev-addon but not both at the same time.

nikDemyankov commented 7 years ago

Cool, at least you found what causing the problem. Will check it out. Also, will rename the issue to be more clear.

screendriver commented 7 years ago

Any news about that? It seems that not only cordova-plugin-camera fails here. I've got other plugins and the build is failing as well.

nikDemyankov commented 7 years ago

Was busy with the main plugin: preparing new release with bug fixes and improvements. So, didn't have time for that one.

What other plugins?

screendriver commented 7 years ago

I can't figure it out. I have +10 plugins and need all of them. Without them my App doesn't work respectively doesn't start.

nikDemyankov commented 7 years ago

Okay, the problem is that this plugin does some changes in application's .plist, and in some situations it breaks it's format. And for some reason that happens only if other plugins add stuff to .plist as well.

nikDemyankov commented 7 years ago

Released v0.4.1 with the fix. Should work now. If not - please, reopen the issue.

screendriver commented 7 years ago

Now I get a Error: Cannot find module 'plist-native'

PS: I can't reopen it because you closed it 😉

nikDemyankov commented 7 years ago

I just tried it and works fine...

nikDemyankov commented 7 years ago

Maybe some caching issue, I don't know. Try to reinstall the plugin, cleanup the project.

If it doesn't help - just go to YOUR_PROJECT_NAME/plugins/cordova-hot-code-push-local-dev-addon/ and run npm i, or even npm i plist-native.

screendriver commented 7 years ago

npm i:

gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/me/.nvm/versions/node/v6.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.0.0
gyp ERR! command "/Users/me/.nvm/versions/node/v6.7.0/bin/node" "/Users/me/.nvm/versions/node/v6.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/me/Development/frame/plugins/cordova-hot-code-push-local-dev-addon/node_modules/libxmljs
gyp ERR! node -v v6.7.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Darwin 16.0.0
npm ERR! argv "/Users/me/.nvm/versions/node/v6.7.0/bin/node" "/Users/me/.nvm/versions/node/v6.7.0/bin/npm" "i"
npm ERR! node v6.7.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! libxmljs@0.17.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxmljs@0.17.1 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs libxmljs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls libxmljs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/me/Development/frame/plugins/cordova-hot-code-push-local-dev-addon/npm-debug.log

npm i plist-native: the same

nikDemyankov commented 7 years ago

It seems like it is not compatible with your OS for some reason. Okay, will try to use another package...

nikDemyankov commented 7 years ago

Please, try now by installing plugin like this:

cordova plugin add https://github.com/nordnet/cordova-hot-code-push-local-dev-addon.git
screendriver commented 7 years ago

Thank you. Now it seems to work 👍

nikDemyankov commented 7 years ago

Cool, closing then. Uploaded this version on npm.