[SOLVED] Native Power Management plugin problem

Hi, I am using Ionic 2 native power management plugin but I get an error when I run ionic build ios:

The following build commands failed:

CompileC /Users/xxx/Library/Developer/Xcode/DerivedData/myapp-auizljpsnbtvvdcytjeqelpzhulg/Build/Intermediates/myapp.build/Debug-iphonesimulator/myapp.build/Objects-normal/x86_64/PowerManagement.o myapp/Plugins/at.gofg.sportscomputer.powermanagement/PowerManagement.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/xxx/myapp/platforms/ios/cordova/build-debug.xcconfig,-workspace,myapp.xcworkspace,-scheme,myapp,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone 5s,build,CONFIGURATION_BUILD_DIR=/Users/xxx/myapp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/xxx/myapp/platforms/ios/build/sharedpch

How do I fix this? Thanks in advance.

SOLUTION:

cordova platform remove ios
cordova platform add ios@3.9.2