ionic-team / legacy-ionic-cloud

JavaScript Client for legacy Ionic Cloud services. See Ionic Pro for our new take on the ionic development lifecycle
Apache License 2.0
65 stars 26 forks source link

'OneSignal/OneSignal.h' file not found #213

Open djereg opened 7 years ago

djereg commented 7 years ago

When upgrading to onesignal-cordova-plugin ~2.1.1, cloud build fails with the next error:

CompileC /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Objects-normal/armv7/OneSignalPush.o Törökbálint-Ma/Plugins/onesignal-cordova-plugin/OneSignalPush.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode8.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode8.app/Contents/Developer/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-cache-path=/Users/package/Library/Developer/Xcode/DerivedData/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/package/Library/Developer/Xcode/DerivedData/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/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.0 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Törökbálint-Ma-generated-files.hmap -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Törökbálint-Ma-own-target-headers.hmap -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Törökbálint-Ma-all-target-headers.hmap -iquote /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Törökbálint-Ma-project-headers.hmap -I/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/build/device/include -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/InstallationBuildProductsLocation/Applications/usr/local/lib/include -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/UninstalledProducts/include -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/include -I/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/build/device -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/DerivedSources/armv7 -I/Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/DerivedSources -F/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/build/device -FTörökbálint-Ma/Plugins/cordova-plugin-facebook4 -include /Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/build/sharedpch/Törökbálint-Ma-Prefix-amozgrbacvhnyldkmqvkjzcxwvgb/Törökbálint-Ma-Prefix.pch -MMD -MT dependencies -MF /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Objects-normal/armv7/OneSignalPush.d --serialize-diagnostics /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Objects-normal/armv7/OneSignalPush.dia -c /Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/Törökbálint-Ma/Plugins/onesignal-cordova-plugin/OneSignalPush.m -o /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Objects-normal/armv7/OneSignalPush.o
In file included from /Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/Törökbálint-Ma/Plugins/onesignal-cordova-plugin/OneSignalPush.m:31:
/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/Törökbálint-Ma/Plugins/onesignal-cordova-plugin/OneSignalPush.h:32:9: fatal error: 'OneSignal/OneSignal.h' file not found
#import <OneSignal/OneSignal.h>
        ^
1 error generated.

** ARCHIVE FAILED **

The following build commands failed:
    CompileC /Users/package/Library/Developer/Xcode/DerivedData/Törökbálint-Ma-caehizzstdoifkazjkdgtpoycqsi/Build/Intermediates/ArchiveIntermediates/Törökbálint-Ma/IntermediateBuildFilesPath/Törökbálint-Ma.build/Release-iphoneos/Törökbálint-Ma.build/Objects-normal/armv7/OneSignalPush.o Törökbálint-Ma/Plugins/onesignal-cordova-plugin/OneSignalPush.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/cordova/build-release.xcconfig,-workspace,Törökbálint-Ma.xcworkspace,-scheme,Törökbálint-Ma,-configuration,Release,-destination,generic/platform=iOS,-archivePath,Törökbálint-Ma.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/package/workspace/apps-54624e0c-159/cordova/platforms/ios/build/sharedpch

I can build it on local machine, only cloud build fails.

With onesignal-cordova-plugin ~2.0.11 the cloud build works fine.

global packages:

    @ionic/cli-utils : 1.2.0
    Cordova CLI      : 6.5.0 
    Ionic CLI        : 3.2.0

local packages:

    @ionic/app-scripts              : 1.3.7
    @ionic/cli-plugin-cordova       : 1.2.1
    @ionic/cli-plugin-ionic-angular : 1.2.0
    Cordova Platforms               : android 6.2.3 ios 4.3.1
    Ionic Framework                 : ionic-angular 3.3.0

System:

    Node       : v7.4.0
    OS         : macOS Sierra
    Xcode      : Xcode 8.3.2 Build version 8E2002 
    ios-deploy : 1.9.0 
    ios-sim    : 5.0.13
Craytor commented 7 years ago

Have you figured this out by chance? Having the same error! Thanks!

Spanchal21 commented 6 years ago

working fine with ionic2 + android but Having the same error with ionic2 + IOS.

rogeliotrejo13 commented 6 years ago

Same Issue

global packages:

@ionic/cli-plugin-proxy : 1.3.1
@ionic/cli-utils        : 1.4.0
Cordova CLI             : 7.0.1 
Ionic CLI               : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.12
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : ios 4.4.0
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v7.9.0
OS         : macOS Sierra
Xcode      : Xcode 8.3.3 Build version 8E3004b 
ios-deploy : 1.9.1 
ios-sim    : 5.1.0 
npm        : 5.0.0 
Spanchal21 commented 6 years ago

@rogeliotrejo13

please set your platform directory after then try to install OneSignal plugin.

rogeliotrejo13 commented 6 years ago

@Spanchal21 I tried your solution too, and I have the same error. Thank you!

Spanchal21 commented 6 years ago

@rogeliotrejo13 please update/install latest ionic and try again

jestintab commented 6 years ago

same error!! @rogeliotrejo13 have you resolved it.

jestintab commented 6 years ago

I solved it by adding cocapods and removing and adding the one-signal plugin again. https://documentation.onesignal.com/v3.0/docs/ionic-sdk-setup

mbdwey commented 6 years ago

Run pod setup

salimchemes commented 6 years ago

same issue here, did you find any fix?

rogeliotrejo13 commented 6 years ago

In the installation guide in one signal website, I found how install one signal with cocoapods, and I solved it https://documentation.onesignal.com/docs/ionic-sdk-setup

sudo gem install cocoapods pod repo update

seedgabo commented 6 years ago

any updates of this?

salimchemes commented 6 years ago

@seedgabo try to run pod install (on ios folder) and be sure one-signal is installed, then I had to include it manually from XCode on Build Phases -> Link binary with libraries. Click on the plus icon and look for OneSignal on (this is where OneSignal should be installed if pod install worked fine) platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework/OneSignal.framework (or similar) Then compile and it should be fixed

severmay commented 6 years ago

@salimchemes , thank you, this solution works

matthew-valenti commented 6 years ago

The approach by @salimchemes was successful for me. To clarify one point -- the "project" target needs to include link binary OneSignal.framework (as described). After following the OneSignal docs, I also have a "OneSignalNotificationsServiceExtension" target with link binary OneSignal.framework. So both targets needed to include OneSignal.framework.