Skip to content
This repository has been archived by the owner on Apr 2, 2018. It is now read-only.

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

Open
djereg opened this issue May 25, 2017 · 15 comments
Open

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

djereg opened this issue May 25, 2017 · 15 comments

Comments

@djereg
Copy link

djereg commented May 25, 2017

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
Copy link

Craytor commented Jun 10, 2017

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

@Spanchal21
Copy link

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

@rogeliotrejo13
Copy link

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
Copy link

@rogeliotrejo13

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

@rogeliotrejo13
Copy link

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

@Spanchal21
Copy link

@rogeliotrejo13
please update/install latest ionic
and try again

@jestintab
Copy link

same error!! @rogeliotrejo13 have you resolved it.

@jestintab
Copy link

jestintab commented Jul 12, 2017

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
Copy link

mbdwey commented Jul 27, 2017

Run pod setup

@salimchemes
Copy link

same issue here, did you find any fix?

@rogeliotrejo13
Copy link

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
Copy link

any updates of this?

@salimchemes
Copy link

@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
Copy link

severmay commented Oct 7, 2017

@salimchemes , thank you, this solution works

@matthew-valenti
Copy link

matthew-valenti commented Feb 15, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants