After adding a media plug-in, Ionic Cordova IOS build failed

I am using Ionic Framework and Cordova to develop a mobile app, I tried to add Cordova media plugin, it won’t build for me.

I even tried Create a new starter tab project, and then add the media plug-in, as shown in the figure. The project cannot be compiled due to the added media plug-in.

npm install -g cordova ionic gulp 
ionic start ionicTest tabs
ionic platform add ios
cordova plugin add org.apache.cordova.media
ionic build ios

Then I delete the media plugin, No problem, the project compiles perfectly

cordova plugin rm org.apache.cordova.media
ionic build ios

This is the error I received Message, I am using Cordova version 4.1.2

The following build commands failed:
CompileC build/ionicTest.build/Debug-iphonesimulator/ionicTest.build/ Objects-normal/i386/CDVFile.o ionicTest/Plugins/org.apache.cordova.file/CDVFile.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/ionicTest .build/Debug-iphonesimulator/ionicTest.build/Objects-normal/i386/CDVLocalFilesystem.o ionicTest/Plugins/org.apache.cordova.file/CDVLocalFilesystem.m normal i386 objective-c com.apple.compiler s.llvm.clang.1_0.compiler
CompileC build/ionicTest.build/Debug-iphonesimulator/ionicTest.build/Objects-normal/i386/CDVSound.o ionicTest/Plugins/org.apache.cordova.media/CDVSound .m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/ionicTest.build/Debug-iphonesimulator/ionicTest.build/Objects-normal/i386/CDVAssetLibraryFilesystem.o ionicTest/ Plugins/org.apache.cordova.file/CDVAssetLibraryFilesystem.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(4 failures)
Error: /Users/steven/ web/ionicTest/platforms/ios/cordova/build: Command failed with exit code 65

add plugin When compiling, you must delete and add the platform to compile (this is an error). Please try the following method:

> cordova plugin add org.apache.cordova.media
> ion platform delete ios
>Ion platform add ios

Also make sure to stand in the app directory (ionicTest) when issuing the command. Check if there are two folders in the app folder platform and plugin (same as www ). If not, please create them before installing the plugin. If they are missing, the plugin installation will fail, there may be no error message.

I am developing with Ionic Framework and Cordova Mobile application, I tried to add C ordova media plugin, it won’t build for me.

I even tried to create a new starter tab project and then add the media plugin as shown in the picture. Thanks to the media plugin, the project Could not compile.

npm install -g cordova ionic gulp
ionic start ionicTest tabs
ionic platform add ios
cordova plugin add org.apache .cordova.media
ionic build ios

Then I delete the media plugin, no problem, the project compiles perfectly

cordova plugin rm org.apache. cordova.media
ionic build ios

This is the error message I received, I am using Cordova version 4.1.2

The The following build commands failed:
CompileC build/ionicTest.build/Debug-iphonesimulator/ionicTest.build/Objects-normal/i386/CDVFile.o ionicTest/Plugins/org.apache.cordova.file/CDVFile.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/ionicTest.build/Debug-iphonesimulator/ionicTest.build/Objects-normal/i386/CDVLocalFilesystem.o ionicTest/Plugins/org. apache.cordova.file/CDVLocalFilesystem.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/ionicTest.build/Debug-iphonesi mulator/ionicTest.build/Objects-normal/i386/CDVSound.o ionicTest/Plugins/org.apache.cordova.media/CDVSound.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC build/ionicTest.build/Debug-iphonesimulator/ionicTest.build/Objects-normal/i386/CDVAssetLibraryFilesystem.o ionicTest/Plugins/org.apache.cordova.file/CDVAssetLibraryFilesystem.m normal i386 objective-c com.apple. compilers.llvm.clang.1_0.compiler
(4 failures)
Error: /Users/steven/web/ionicTest/platforms/ios/cordova/build: Command failed with exit code 65

When adding a plug-in, you must delete and add the platform to compile (this is an error). Please try the following method:

> cordova Plugin add org.apache.cordova.media
>ionic platform delete ios
>ionic platform add ios

Also make sure to stand in the app directory (ionicTest) when issuing the command. Check app Are there two folders in the folder platform and plugins (same as www). If not, please create them before installing the plugin. If they are missing, the plugin installation will fail and there may be no error message.

Leave a Comment

Your email address will not be published.