apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

Issue when compiling app for ios on mac made on Ubuntu #1013

Closed gpistotnik closed 3 years ago

gpistotnik commented 3 years ago

Issue Type

Description

I am developing an app for ios and Android. For Android I use Ubuntu 20.04, and for ios mac. I get error on mac when compiling files from ubuntu.

Command or Code

cordova build ios

Environment, Platform, Device

App made on Ubuntu 20.04, compiled for android, moved to OSX, compilation error for ios

Version information

All versions are updated to the latest

breautek commented 3 years ago

I get error on mac when compiling files from ubuntu.

You can't just simply transfer files from one machine to another, especially cross OS. Doing so would bring over NPM dependencies and native binaries that are not for your target platform.

You can still share your repo cross OS, but the following directories should be ignored from your version control:

On every machine that you clone your project, you should run npm install to install all the dependencies (including any potential native dependencies). Then you should run cordova platform add ios. This will configure the iOS project properly on your mac. The platform and all plugins will be restored based on what is inside your package.json file (or config.xml)

If this doesn't solve your problem, then you will need to give us more details including cordova version and the actual error message. Please let us know. The output of cordova info command will tell us nearly everything that we need to know.

gpistotnik commented 3 years ago

I get message: The following build commands failed: CompileAssetCatalog platforms/ios/build/emulator/APKNAME.app platforms/ios/APKNAME/Images.xcasset (1 failure) xcodebuild: Command failed with exit code 65

cordova info:

Cordova Packages:

cli: 10.0.0
    common: 4.0.2
    create: 3.0.0
    lib: 10.0.0
        common: 4.0.2
        fetch: 3.0.0
        serve: 4.0.0

Project Installed Platforms:

ios: 6.1.1

Project Installed Plugins:

cordova-plugin-whitelist: 1.3.4

Environment:

OS: macOS Catalina 10.15.7 (19H2) (darwin 19.6.0) x64
Node: v12.18.0
npm: 6.14.8

ios Environment:

xcodebuild:

Xcode 12.1 Build version 12A7403

Project Setting Files:

config.xml:

<?xml version='1.0' encoding='utf-8'?>

Name Description Author
package.json:

--- Start of Cordova JSON Snippet --- { "plugins": { "cordova-plugin-whitelist": {} }, "platforms": [ "android", "ios" ] } --- End of Cordova JSON Snippet ---

breautek commented 3 years ago

I get message:

Does this occur when you freshly add the ios platform to your project on your mac?

gpistotnik commented 3 years ago

Made android studio and xcode app. Thanks anyway