Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Phil_P___Pete_
New Contributor I
67 Views

phonegap-plugin-diagnostic 3.2.0 won't build on iOS

phonegap-plugin-diagnostic 3.2.0 won't build on iOS although 3.1.7 builds fine.

Mostly this is an FYI... this problem hasn't been reported on github although other errors with 3.2.0 have been.

CompileC build/mycoolapp.build/Release-iphoneos/mycoolapp.build/Objects-normal/armv7/Diagnostic.o mycoolapp/Plugins/cordova.plugins.diagnostic/Diagnostic.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd .../cordova_project/platforms/ios
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents.../Platforms/iPhoneOS.platform.../usr/bin:/Applications/Xcode.app/Contents.../usr/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools:/platform-tools"
    /Applications/Xcode.app/Contents.../Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch armv7 -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/m7/5jt5pgr16nn584gyc3mh09rh0000gp/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -Os -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-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents.../Platforms/iPhoneOS.platform.../SDKs/iPhoneOS9.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.0 -g -fvisibility=hidden -Wno-sign-conversion -iquote .../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/mycoolapp-generated-files.hmap -I.../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/mycoolapp-own-target-headers.hmap -I.../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/mycoolapp-all-target-headers.hmap -iquote .../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/mycoolapp-project-headers.hmap -I.../cordova_project/platforms/ios/build/device/include -I.../cordova_project/platforms/ios/build/device/usr/local/lib/include -I.../cordova_project/platforms/ios/build/UninstalledProducts/include -I.../cordova_project/platforms/ios/build/UninstalledProducts/iphoneos/include -I.../cordova_project/platforms/ios/build/device -I.../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/DerivedSources/armv7 -I.../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/DerivedSources -F.../cordova_project/platforms/ios/build/device -include .../cordova_project/platforms/ios/build/sharedpch/mycoolapp-Prefix-eoxavozygdwhkcbdinimrxaflzly/mycoolapp-Prefix.pch -MMD -MT dependencies -MF .../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/Objects-normal/armv7/Diagnostic.d --serialize-diagnostics .../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/Objects-normal/armv7/Diagnostic.dia -c .../cordova_project/platforms/ios/mycoolapp/Plugins/cordova.plugins.diagnostic/Diagnostic.m -o .../cordova_project/platforms/ios/build/mycoolapp.build/Release-iphoneos/mycoolapp.build/Objects-normal/armv7/Diagnostic.o
.../cordova_project/platforms/ios/mycoolapp/Plugins/cordova.plugins.diagnostic/Diagnostic.m:13:9: fatal error: 'UserNotifications/UserNotifications.h' file not found
#import <UserNotifications/UserNotifications.h>
        ^
1 error generated.

 

Tags (2)
0 Kudos
3 Replies
PaulF_IntelCorp
Employee
67 Views

Thanks for that heads-up, Phil. I'll remove the reference to 3.2.0 in that feed to avoid confusion by others.

Phil_P___Pete_
New Contributor I
67 Views

You're welcome and apparently XDK needs to go to xcode 8 for this to work...

cordova.plugins.diagnostic@3.2.0 adds support for the new UserNotifications framework added in iOS 10. To build using v3.2.0, you will need to use XCode 8+ because there's no way to conditionally include a framework using the <framework> tag in the plugin.xml.

Currently (25 Sep 2016) cloud-based build platforms such as Phonegap Build, Ionic Cloud and Intel XDK are still using an XCode 7 build environment, so building with cordova.plugins.diagnostic@3.2 results in a fatal build error framework not found UserNotifications.

Therefore, users of these cloud platforms should specify cordova.plugins.diagnostic@3.1 in their config.xml until such time as their cloud platform is updated to use XCode 8+.

PaulF_IntelCorp
Employee
67 Views

Which explains the reason for the failure. Our iOS build system is still based on Xcode 7, and will likely not be updated to Xcode 8 until we upgrade to a newer version of Cordova CLI. Thanks again. :)

Reply