cordova-plugin-geofence error on ios ionic - ios

I have installed cordova-plugin-geofence in my project but when i try to build it gives following errors :-
The following build commands failed:
CompileSwift normal arm64 /Users/itr/Desktop/richboy/platforms/ios/OnTheList/Plugins/cordova-plugin-geofence/GeofencePlugin.swift
CompileSwift normal arm64 /Users/itr/Desktop/richboy/platforms/ios/OnTheList/Plugins/cordova-plugin-geofence/SwiftData.swift
CompileSwift normal arm64 /Users/itr/Desktop/richboy/platforms/ios/OnTheList/Plugins/cordova-plugin-geofence/SwiftyJson.swift
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
(4 failures)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/itr/Desktop/richboy/platforms/ios/cordova/build-debug.xcconfig,-workspace,OnTheList.xcworkspace,-scheme,OnTheList,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,OnTheList.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/itr/Desktop/richboy/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/itr/Desktop/richboy/platforms/ios/build/sharedpch
How to resolve these errors ?

This solution work for me
Go to your project->platforms->ios->projectName(folder)->plugins->cordova-plugin-geofence
You will find four files.
Replace this file with this file content https://github.com/ypelud/cordova-plugin-geofence/tree/d2e1f22340ac2cd07559598fd290df462e75055d/src/ios

Related

##[error]Error: /usr/bin/xcodebuild failed with return code: 65 while creating react native ios pipeline

These are the errors I'm getting in xcode build when I try to create CI pipeline for IOS react native:
/Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h:1:9:
'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
error: failed to emit precompiled header
'/Users/runner/Library/Developer/Xcode/DerivedData/CashfreePgApi-cxepqieabxscabamwybllnvrmoxw/Build/Intermediates.noindex/PrecompiledHeaders/CashfreePgApi-Bridging-Header-swift_QBU1IX81MTNU-clang_38LLOP6JLEB2G.pch'
for bridging header
/Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h
error: generate-pch command failed with exit code 1 (use -v to see
invocation)
error: generate-pch command failed with exit code 1 (use -v to see
invocation)
5./Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h:1:9: 'React/RCTBridgeModule.h' file not found
#import <React/RCTBridgeModule.h>
error: failed to emit precompiled header
'/Users/runner/Library/Developer/Xcode/DerivedData/CashfreePgApi-cxepqieabxscabamwybllnvrmoxw/Build/Intermediates.noindex/PrecompiledHeaders/CashfreePgApi-Bridging-Header-swift_2NTBLPEWKMQVG-clang_33EQLJXKHECM6.pch'
for bridging header
/Users/runner/work/1/s/node_modules/react-native-cashfree-pg-sdk/ios/CashfreePgApi-Bridging-Header.h
The following build commands failed:
PrecompileSwiftBridgingHeader normal armv7 (in target 'CashfreePgApi' from project 'CashfreePgApi')
CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler (in target 'CashfreePgApi' from project 'CashfreePgApi')
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (in target 'CashfreePgApi' from project 'CashfreePgApi')
PrecompileSwiftBridgingHeader normal arm64 (in target 'CashfreePgApi' from project 'CashfreePgApi') (4 failures)

Command PhaseScriptExecution failed with a nonzero exit code M1

I am using M1 and I got an error when I tried to run my project on simulator.
After some research I added armv7s armv7 i386 x86_64 arm64 in Excluded Architectures and now I got another error saying: Command PhaseScriptExecution failed with a nonzero exit code

Build failed: CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler

I am getting the below error when I build my iOS project in Xcode 11.0 for Simulator 11.
CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler
How can I resolve it?

Xcode Jenkins Build Failure The following build commands failed: CompileSwift normal arm64

I am trying to setup a continuous integration for an Ios App using Jenkins. I used xcode shell command for build process:
/usr/bin/xcodebuild -workspace "PhoenixiOS.xcworkspace" -scheme
"PhoenixiOSTest" -configuration Release archive
Build triggered and finally the following error displayed
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64
The Git code is working other Developers Laptop and The code is working on other work spaces like Desktop with the shell command. Only in Jenkins JOB work space it is producing this Error.
log last lines --code
/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/PhoenixiOS-calcgxkedqnxdqcshfjebjolxcut/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOSTest/IntermediateBuildFilesPath/PhoenixiOS.build/Release-iphoneos/PhoenixiOSTest.build/Objects-normal/arm64/EnableLocationServicesView.d
-num-threads 4 -output-filelist /var/folders/jc/fl1lw1754rvd8568qp_wcf5w00008b/T/outputs-f754ba
/Users/Shared/Jenkins/Home/workspace/Phoenix_IOS_D/PhoenixiOS/PhoenixiOS-Bridging-Header.h:7:9:
error: 'NewRelicAgent/NewRelic.h' file not found
#import "NewRelicAgent/NewRelic.h"
1 error generated.
:0: error: failed to emit precompiled header
'/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/PhoenixiOS-calcgxkedqnxdqcshfjebjolxcut/Build/Intermediates.noindex/ArchiveIntermediates/PhoenixiOSTest/PrecompiledHeaders/PhoenixiOS-Bridging-Header-swift_344FHIEQ5169K-clang_9521NPKFGEEZ.pch'
for bridging header
'/Users/Shared/Jenkins/Home/workspace/Phoenix_IOS_D/PhoenixiOS/PhoenixiOS-Bridging-Header.h'
** ARCHIVE FAILED **
The following build commands failed:
CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
CompileSwift normal arm64 (2 failures) Build step 'Execute shell'
marked build as failure
It was due to code Pipeline unable to unzip .git files. better to clone using git ssh.

use xcodebuild to creat a CI system, error : "Ld build xxxx normal arm64"

Recently I was asked to creat a CI system, so I tride to use xcodebuild.
But I got Errors, the command is :xcodebuild -sdk iphoneos -configuration Release clean build
Errors:
ld: library not found for -lFMDB
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **
The following build commands failed:
Ld build/ProjectName.build/Release-iphoneos/ProjectName.build/Objects-normal/armv7/ProjectName normal armv7
Ld build/ProjectName.build/Release-iphoneos/ProjectName.build/Objects-normal/arm64/ProjectName normal arm64
I import FMDB by cocoa pods, and Header Search Path has this path "${PODS_ROOT}/Headers/Public/FMDB".
Please help me,thx very much.

Resources