transistorsoft / cordova-background-geolocation-SampleApp

Cordova Background Geolocation Sample Application
https://www.transistorsoft.com/shop/products/cordova-background-geolocation
MIT License
122 stars 78 forks source link

Building & running ionic3 app doesn't work on a fresh install #85

Closed fcamblor closed 7 years ago

fcamblor commented 7 years ago

Hi !

I just cloned the repo (and used master branch) and followed the instruction to build & run SampleApp on my machine, it fails during ionic cordova run ios --emulate :

The following build commands failed:
    CompileC build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-623D25BD0E2A7D8A.o BG\ Geo\ 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/cordova/build-debug.xcconfig,-project,BG Geo 2.xcodeproj,-target,BG Geo 2,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,build,CONFIGURATION_BUILD_DIR=/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/sharedpch
Full Console output ```bash cordova-background-geolocation-SampleApp> ionic cordova run ios --emulator [INFO] Running app-scripts build: --platform ios --target cordova [20:06:18] build dev started ... [20:06:18] clean started ... [20:06:18] clean finished in 3 ms [20:06:18] copy started ... [20:06:18] transpile started ... [20:06:20] transpile finished in 2.15 s [20:06:20] preprocess started ... [20:06:20] deeplinks started ... [20:06:20] deeplinks finished in 87 ms [20:06:20] preprocess finished in 88 ms [20:06:20] webpack started ... [20:06:20] copy finished in 2.36 s [20:06:26] webpack finished in 6.03 s [20:06:26] sass started ... [20:06:28] sass finished in 1.97 s [20:06:28] postprocess started ... [20:06:28] removed unused font files [20:06:28] postprocess finished in 7 ms [20:06:28] lint started ... [20:06:28] build dev finished in 10.28 s > ionic cordova prepare ios > cordova prepare ios > cordova run ios --emulator [20:06:30] tslint: src/pages/settings/settings.ts, line: 1 'NgZone' is declared but never used. L1: import { Component, NgZone } from '@angular/core'; L2: import { [20:06:30] tslint: src/pages/home/home.ts, line: 4 'ElementRef' is declared but never used. L3: ViewChild, L4: ElementRef, L5: NgZone [20:06:30] tslint: src/pages/home/home.ts, line: 5 'NgZone' is declared but never used. L4: ElementRef, L5: NgZone L6: } from '@angular/core'; [20:06:30] lint finished in 2.07 s Building project: /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2.xcodeproj Configuration: Debug Platform: emulator Build settings from command line: CONFIGURATION_BUILD_DIR = /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator SDKROOT = iphonesimulator11.0 SHARED_PRECOMPS_DIR = /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/sharedpch Build settings from configuration file '/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/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 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 BG Geo 2 OF PROJECT BG Geo 2 WITH CONFIGURATION Debug === Check dependencies PhaseScriptExecution Copy\ www\ directory build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Script-304B58A110DAC018002A0835.sh cd /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios /bin/sh -c \"/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Script-304B58A110DAC018002A0835.sh\" ProcessInfoPlistFile build/emulator/BG\ Geo\ 2\ 2.app/Info.plist BG\ Geo\ 2/BG\ Geo\ 2-Info.plist cd /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/node_modules/.bin:/Users/fcamblor/.jenv/shims:/Users/fcamblor/tools/google-cloud-sdk/bin:/usr/local/opt/coreutils/libexec/gnubin:/Users/fcamblor/tools/google-cloud-sdk/bin:./node_modules/.bin:/Users/fcamblor/.fastlane/bin:/Users/fcamblor/tools/homebrew/bin:/Users/fcamblor/tools/homebrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/share/npm/bin:/Users/fcamblor/.jenv/bin:/Users/fcamblor/bashscripts:/Users/fcamblor/tools/android/android-sdk-macosx/platform-tools:/Users/fcamblor/tools/android/android-sdk-macosx/tools:/Users/fcamblor/tools/dart/dart-sdk/bin:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/bin:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/platform-tools:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/tools:/Users/fcamblor/tools/appengine/current/bin:/Users/fcamblor/.gem/ruby/2.0.0/bin:/Users/fcamblor/Documents/projects/docker-utils/scripts" builtin-infoPlistUtility /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG\ Geo\ 2/BG\ Geo\ 2-Info.plist -genpkginfo /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator/BG\ Geo\ 2\ 2.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/MainViewController-PartialInfo.plist -additionalcontentfile /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/assetcatalog_generated_info.plist -o /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator/BG\ Geo\ 2\ 2.app/Info.plist CompileC build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-623D25BD0E2A7D8A.o BG\ Geo\ 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios export LANG=en_US.US-ASCII export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/node_modules/.bin:/Users/fcamblor/.jenv/shims:/Users/fcamblor/tools/google-cloud-sdk/bin:/usr/local/opt/coreutils/libexec/gnubin:/Users/fcamblor/tools/google-cloud-sdk/bin:./node_modules/.bin:/Users/fcamblor/.fastlane/bin:/Users/fcamblor/tools/homebrew/bin:/Users/fcamblor/tools/homebrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/share/npm/bin:/Users/fcamblor/.jenv/bin:/Users/fcamblor/bashscripts:/Users/fcamblor/tools/android/android-sdk-macosx/platform-tools:/Users/fcamblor/tools/android/android-sdk-macosx/tools:/Users/fcamblor/tools/dart/dart-sdk/bin:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/bin:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/platform-tools:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/tools:/Users/fcamblor/tools/appengine/current/bin:/Users/fcamblor/.gem/ruby/2.0.0/bin:/Users/fcamblor/Documents/projects/docker-utils/scripts" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/_b/c2fk7byd55594tjbys4pnlkr0000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-generated-files.hmap -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-own-target-headers.hmap -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-all-target-headers.hmap -iquote /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-project-headers.hmap -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator/usr/local/lib/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/UninstalledProducts/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/UninstalledProducts/iphonesimulator/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/DerivedSources/i386 -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/DerivedSources -F/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator -FBG\ Geo\ 2/Plugins/cordova-background-geolocation-lt -FBG\ Geo\ 2/Plugins/cordova-plugin-background-fetch -FBG\ Geo\ 2/Plugins/com.transistorsoft.cordova.background-geolocation -include /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/sharedpch/BG\ Geo\ 2-Prefix-gumvkevrzefanzfcersxuipgdtdy/BG\ Geo\ 2-Prefix.pch -MMD -MT dependencies -MF /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-623D25BD0E2A7D8A.d --serialize-diagnostics /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-623D25BD0E2A7D8A.dia -c /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG\ Geo\ 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m -o /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-623D25BD0E2A7D8A.o /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:30:11: error: property 'locationChangedBlock' not found on object of type 'TSLocationManager *' bgGeo.locationChangedBlock = [self createLocationChangedHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:31:11: error: property 'motionChangedBlock' not found on object of type 'TSLocationManager *' bgGeo.motionChangedBlock = [self createMotionChangedHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:32:11: error: property 'activityChangedBlock' not found on object of type 'TSLocationManager *' bgGeo.activityChangedBlock = [self createActivityChangedHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:33:11: error: property 'authorizationChangedBlock' not found on object of type 'TSLocationManager *' bgGeo.authorizationChangedBlock = [self createAuthorizationChangedHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:34:11: error: property 'heartbeatBlock' not found on object of type 'TSLocationManager *' bgGeo.heartbeatBlock = [self createHeartbeatHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:35:11: error: property 'geofenceBlock' not found on object of type 'TSLocationManager *' bgGeo.geofenceBlock = [self createGeofenceHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:36:11: error: property 'syncCompleteBlock' not found on object of type 'TSLocationManager *' bgGeo.syncCompleteBlock = [self createSyncCompleteHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:37:11: error: property 'httpResponseBlock' not found on object of type 'TSLocationManager *' bgGeo.httpResponseBlock = [self createHttpResponseHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:38:11: error: property 'errorBlock' not found on object of type 'TSLocationManager *' bgGeo.errorBlock = [self createErrorHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:39:11: error: property 'scheduleBlock' not found on object of type 'TSLocationManager *' bgGeo.scheduleBlock = [self createScheduleHandler]; ^ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:130:16: error: no visible @interface for 'TSLocationManager' declares the selector 'resetOdometer' [bgGeo resetOdometer]; ~~~~~ ^~~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:154:34: error: no visible @interface for 'TSLocationManager' declares the selector 'getLocations' @"locations": [bgGeo getLocations], ~~~~~ ^~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:190:37: error: no visible @interface for 'TSLocationManager' declares the selector 'sync' NSArray* locations = [bgGeo sync]; ~~~~~ ^~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:262:16: error: no visible @interface for 'TSLocationManager' declares the selector 'addGeofence:radius:latitude:longitude:notifyOnEntry:notifyOnExit:' [bgGeo addGeofence:[cfg objectForKey:@"identifier"] ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:282:16: error: no visible @interface for 'TSLocationManager' declares the selector 'addGeofences:' [bgGeo addGeofences:geofences]; ~~~~~ ^~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:297:20: error: no visible @interface for 'TSLocationManager' declares the selector 'removeGeofence:' if ([bgGeo removeGeofence:identifier]) { ~~~~~ ^~~~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:312:20: error: no visible @interface for 'TSLocationManager' declares the selector 'removeGeofences' if ([bgGeo removeGeofences]) { ~~~~~ ^~~~~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:359:16: error: no visible @interface for 'TSLocationManager' declares the selector 'updateCurrentPosition:' [bgGeo updateCurrentPosition:options]; ~~~~~ ^~~~~~~~~~~~~~~~~~~~~ /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG Geo 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m:430:31: error: no visible @interface for 'TSLocationManager' declares the selector 'insertLocation:' BOOL success = [bgGeo insertLocation: params]; ~~~~~ ^~~~~~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. CompileC build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-699513908F43ABAB.o BG\ Geo\ 2/Plugins/cordova-background-geolocation-lt/CDVBackgroundGeolocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler cd /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios export LANG=en_US.US-ASCII export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/node_modules/.bin:/Users/fcamblor/.jenv/shims:/Users/fcamblor/tools/google-cloud-sdk/bin:/usr/local/opt/coreutils/libexec/gnubin:/Users/fcamblor/tools/google-cloud-sdk/bin:./node_modules/.bin:/Users/fcamblor/.fastlane/bin:/Users/fcamblor/tools/homebrew/bin:/Users/fcamblor/tools/homebrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/share/npm/bin:/Users/fcamblor/.jenv/bin:/Users/fcamblor/bashscripts:/Users/fcamblor/tools/android/android-sdk-macosx/platform-tools:/Users/fcamblor/tools/android/android-sdk-macosx/tools:/Users/fcamblor/tools/dart/dart-sdk/bin:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/bin:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/platform-tools:/Users/fcamblor/tools/homebrew/Cellar/android-sdk/24.4.1_1/tools:/Users/fcamblor/tools/appengine/current/bin:/Users/fcamblor/.gem/ruby/2.0.0/bin:/Users/fcamblor/Documents/projects/docker-utils/scripts" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/_b/c2fk7byd55594tjbys4pnlkr0000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.0.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=8.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-generated-files.hmap -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-own-target-headers.hmap -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-all-target-headers.hmap -iquote /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/BG\ Geo\ 2\ 2-project-headers.hmap -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator/usr/local/lib/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/UninstalledProducts/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/UninstalledProducts/iphonesimulator/include -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/DerivedSources/i386 -I/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/DerivedSources -F/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator -FBG\ Geo\ 2/Plugins/cordova-background-geolocation-lt -FBG\ Geo\ 2/Plugins/cordova-plugin-background-fetch -FBG\ Geo\ 2/Plugins/com.transistorsoft.cordova.background-geolocation -include /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/sharedpch/BG\ Geo\ 2-Prefix-gumvkevrzefanzfcersxuipgdtdy/BG\ Geo\ 2-Prefix.pch -MMD -MT dependencies -MF /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-699513908F43ABAB.d --serialize-diagnostics /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-699513908F43ABAB.dia -c /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/BG\ Geo\ 2/Plugins/cordova-background-geolocation-lt/CDVBackgroundGeolocation.m -o /Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-699513908F43ABAB.o ** BUILD FAILED ** The following build commands failed: CompileC build/BG\ Geo\ 2.build/Debug-iphonesimulator/BG\ Geo\ 2.build/Objects-normal/i386/CDVBackgroundGeolocation-623D25BD0E2A7D8A.o BG\ Geo\ 2/Plugins/com.transistorsoft.cordova.background-geolocation/CDVBackgroundGeolocation.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/cordova/build-debug.xcconfig,-project,BG Geo 2.xcodeproj,-target,BG Geo 2,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,build,CONFIGURATION_BUILD_DIR=/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/fcamblor/tmp/cordova-background-geolocation-SampleApp/platforms/ios/build/sharedpch [ERROR] An error occurred while running cordova run ios --emulator (exit code 1). ```



Note that prior to make this work, I had to update a bit current `package.json` : - Remove `cordova-android` & `cordova-ios` as I'm using cordova 6 (and not 7) and engines are already defined in `config.xml` file - Remove `ionic` dependency otherwise I had an error due to conflicting global `ionic` package and local `ionic` package - Remove `@ionic/cli-plugin-*` plugins as suggested by https://github.com/ionic-team/ionic-cli/blob/master/CHANGELOG.md#3.8.0
package.json diff ``` modified: package.json ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── @ package.json:28 @ "@ionic-native/splash-screen": "3.12.1", "@ionic-native/status-bar": "3.12.1", "@ionic/storage": "2.0.1", - "cordova-android": "^6.2.3", "cordova-background-geolocation-lt": "^2.8.4", - "cordova-ios": "^4.4.0", "cordova-plugin-background-fetch": "^5.0.0", "cordova-plugin-cocoalumberjack": "0.0.4", "cordova-plugin-device": "^1.1.6", "cordova-plugin-splashscreen": "^4.0.3", "cordova-plugin-statusbar": "^2.2.3", "cordova-plugin-whitelist": "^1.3.2", "ionic-angular": "3.6.1", "ionic-plugin-keyboard": "^2.2.1", "ionicons": "3.0.0", "iso": "^5.2.0", @ package.json:45 @ }, "devDependencies": { "@ionic/app-scripts": "2.1.4", - "@ionic/cli-plugin-cordova": "1.6.2", - "@ionic/cli-plugin-ionic-angular": "1.4.1", - "ionic": "3.10.3", "ip": "^1.1.5", "lodash": "^4.17.4", "md5": "^2.2.1", ```


FYI, here is my `ionic info` output : ``` cli packages: (/Users/fcamblor/tools/homebrew/lib/node_modules) @ionic/cli-utils : 1.12.0 ionic (Ionic CLI) : 3.12.0 global packages: cordova (Cordova CLI) : 6.5.0 local packages: @ionic/app-scripts : 2.1.4 Cordova Platforms : android 6.3.0 ios 4.2.1 Ionic Framework : ionic-angular 3.6.0 System: Android SDK Tools : 25.2.5 ios-deploy : 1.9.2 Node : v8.5.0 npm : 5.3.0 OS : macOS Sierra Xcode : Xcode 9.0 Build version 9A235 Misc: backend : pro ``` Would you have any idea ?
christocracy commented 7 years ago

Try booting XCode and doing a Product -> Clean.

Then build from XCode.

fcamblor commented 7 years ago

Having a lot of compilation errors (I'm an xcode noob, so, maybe something obvious to fix, but it doesn't work "out of the box" at least)

image

christocracy commented 7 years ago

This is a very old version of CDVBackgroundGeolocation.m. That's not the latest.

Those errors are correct.

What version of cordova-background-geolocation-lt do you have installed in the app?

$ cordova plugins
fcamblor commented 7 years ago

Version 2.8.5, as stated both in confix.xml and package.json

$> cordova plugins
com.transistorsoft.cordova.background-geolocation 2.0.9 "BackgroundGeolocation"
cordova-background-geolocation-lt 2.8.5 "BackgroundGeolocation"
cordova-plugin-background-fetch 4.0.0 "CDVBackgroundFetch"
cordova-plugin-cocoalumberjack 0.0.4 "CocoaLumberjack"
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-dialogs 1.2.1 "Notification"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
christocracy commented 7 years ago

I've just removed package-lock.json from the repo.

Dude: You have 2 versions of the plugin installed:

How'd you manage that?

fcamblor commented 7 years ago

True, that's weird ... will reset my plugins/ dir and reinstall cordova stuff

Dunno how I came to install the plugin, thanks btw :)

christocracy commented 7 years ago

2.0.9 is over a year old.

fcamblor commented 7 years ago

oh yes, I happened to clone the repository one year ago to test the plugin, I guess this version of the plugin was installed at that moment, and I forgot to clean plugins directory since the source update today.

fcamblor commented 7 years ago

@christocracy was right, my remaining com.transistorsoft.cordova.background-geolocation 2.0.9 plugin (dated from my tests one year ago) was the culprit.

Once I rm-ed plugins/ node_modules/ and made a cordova platform rm android ios && npm install && cordova prepare everything was OK.