brandingbrand / react-native-leanplum

MIT License
11 stars 23 forks source link

Compilation error when adding module to project #5

Closed rajputav closed 6 years ago

rajputav commented 6 years ago

I am seeing the following error when attempting to add this module to my project. Any tips on resolving this?

Build target react-native-leanplum

CompileC /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/Objects-normal/x86_64/RNLeanplum.o /.../Development/devops/src/.../node_modules/@brandingbrand/react-native-leanplum/ios/RNLeanplum.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /.../Development/devops/src/.../ios/Pods
    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:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu11 -fobjc-arc -fobjc-weak -fmodules -gmodules -fmodules-cache-path=/.../Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/.../Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -fmodule-name=react_native_leanplum -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wunguarded-availability -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Index/DataStore -iquote /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/react_native_leanplum-generated-files.hmap -I/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/react_native_leanplum-own-target-headers.hmap -I/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/react_native_leanplum-all-non-framework-target-headers.hmap -ivfsoverlay /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/all-product-headers.yaml -iquote /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/react_native_leanplum-project-headers.hmap -I/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Products/Debug-iphonesimulator/react-native-leanplum/include -I/.../Development/devops/src/.../ios/Pods/Headers/Private -I/.../Development/devops/src/.../ios/Pods/Headers/Public -I/.../Development/devops/src/.../ios/Pods/Headers/Public/Intercom -I/.../Development/devops/src/.../ios/Pods/Headers/Public/Leanplum-iOS-SDK -I/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/DerivedSources/x86_64 -I/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/DerivedSources -F/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Products/Debug-iphonesimulator/react-native-leanplum -F/.../Development/devops/src/.../ios/Pods/Leanplum-iOS-SDK -F/.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Products/Debug-iphonesimulator/React -include /.../Development/devops/src/.../ios/Pods/Target\ Support\ Files/react-native-leanplum/react-native-leanplum-prefix.pch -MMD -MT dependencies -MF /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/Objects-normal/x86_64/RNLeanplum.d --serialize-diagnostics /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/Objects-normal/x86_64/RNLeanplum.dia -c /.../Development/devops/src/.../node_modules/@brandingbrand/react-native-leanplum/ios/RNLeanplum.m -o /.../Library/Developer/Xcode/DerivedData/Alfred-fmrgapmofydrikbxsopumlpgjtnu/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-leanplum.build/Objects-normal/x86_64/RNLeanplum.o

/.../node_modules/@brandingbrand/react-native-leanplum/ios/RNLeanplum.m:135:36: error: too many arguments to block call, expected 1, have 3
            reject(@"no_messages", @"There were no messages", error);
            ~~~~~~                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
skyeckstrom commented 6 years ago

Hi Avinash!

This isn't an issue we've run into for any of our internal projects. Could you help us track it down by letting us know:

Looking into it, I don't think it makes sense for that promise to reject if the user doesn't have any messages. I've opened a PR to change this behavior so this promise always resolves.

rajputav commented 6 years ago

that resolved the issue I was seeing!