iOS Question AdditionalLib error with the third party sdk

bjfhs

Active Member
Licensed User
Longtime User
Dear all,
When I use a third party sdk with #AdditionalLib,my code :#AdditionalLib: jpush-ios-3.0.2.framework.swift.3(I have copied the .a and .h file to the Mac Libs folder.)
Do I need copy the file to my windows computer?
the error:
ld: framework not found jpush-ios-3.0.2
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error: ** BUILD FAILED **


The following build commands failed:
Ld Payload/B4i\ Example.app/B4i\ Example normal armv7
(1 failure)
 
Last edited:

bjfhs

Active Member
Licensed User
Longtime User
No.

You need to copy the framework to the Mac libs folder. What is the library doing? It is very simple to implement push notifications with Firebase.
Thank you very much! But Firebase can't use in China.So I use the jpush,now I can use it with b4a, and try to use it with b4i.
I have copy the .a and .h file to the Mac libs folder.But I can't bulid it when use #AdditionalLib.
 
Upvote 0

bjfhs

Active Member
Licensed User
Longtime User
I need two app,one andriod,another ios,so I use the Jpush,it's easy for the server.when I use #AdditionalLib,it show error.
So I want to use inline OBJC
B4X:
#If OBJC
   #import "JPUSHService.h"
#End If

When build ,the error
B4iProject/b4i_main.m:3:9: fatal error: 'JPUSHService.h' file not found
#import "JPUSHService.h"
^
1 error generated.
 
Upvote 0

bjfhs

Active Member
Licensed User
Longtime User
Yes ,I have put the h file in the Mac Libs folder,but when I bulid :
B4iProject/b4i_main.m:3:9: fatal error: 'JPUSHService.h' file not found
 
Upvote 0

bjfhs

Active Member
Licensed User
Longtime User
No,I'm not sure,because the library made by others.
upload_2017-3-31_14-56-3.png

Perhaps it made by Objective-C.
I only write the code,no any other words
B4X:
#If OBJC
#import "JPUSHService.h"
#End If

error
B4iProject/b4i_main.m:3:9: fatal error: 'JPUSHService.h' file not found
 
Last edited:
Upvote 0

bjfhs

Active Member
Licensed User
Longtime User
If I don't use inline OBJC,and use #AdditionalLib
B4X:
     #AdditionalLib: jpush-ios-3.0.2
    #AdditionalLib:jcore-ios-1.1.1
the error
B4X:
B4i version: 3.60
Parsing code.    (0.00s)
Compiling code.    (0.04s)
Compiling layouts code.    (0.00s)
Compiling debugger engine code.    (0.64s)
Building Xcode project    (0.03s)
Sending data to remote compiler.    Error
Out: Build settings from command line:
    ARCHS = armv7
    CODE_SIGN_IDENTITY = iPhone
    CONFIGURATION_BUILD_DIR = /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload
    OTHER_CODE_SIGN_FLAGS = --keychain <user id>
    PRODUCT_NAME = B4i Example
    PROVISIONING_PROFILE = 312b2eec-29b4-45aa-8043-e5452674add0

=== BUILD TARGET B4iProject OF PROJECT B4iProject WITH CONFIGURATION Release ===

Check dependencies

Write auxiliary files
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example.hmap
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-project-headers.hmap
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-all-target-headers.hmap
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-all-non-framework-target-headers.hmap
/bin/mkdir -p /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/B4i\ Example.LinkFileList
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-generated-files.hmap
write-file /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-own-target-headers.hmap

Create product structure
/bin/mkdir -p /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/B4i\ Example.app

ProcessInfoPlistFile Payload/B4i\ Example.app/Info.plist B4iProject/B4iProject-Info.plist
    cd /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    builtin-infoPlistUtility /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/B4iProject/B4iProject-Info.plist -genpkginfo /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/B4i\ Example.app/PkgInfo -expandbuildsettings -format binary -platform iphoneos -o /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/B4i\ Example.app/Info.plist

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o B4iProject/main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.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=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/5n/1sb0rdbd6hz63h3qmtvg2ph40000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -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 -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-generated-files.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-own-target-headers.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-all-target-headers.hmap -iquote /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-project-headers.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/include -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.d --serialize-diagnostics /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.dia -c /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/B4iProject/main.m -o /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o B4iProject/b4i_main.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.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=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/5n/1sb0rdbd6hz63h3qmtvg2ph40000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -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 -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-generated-files.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-own-target-headers.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-all-target-headers.hmap -iquote /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-project-headers.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/include -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.d --serialize-diagnostics /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.dia -c /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/B4iProject/b4i_main.m -o /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/b4i_main.o

CompileC build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_cover.o B4iProject/LS_cover.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.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=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/var/folders/5n/1sb0rdbd6hz63h3qmtvg2ph40000gn/C/org.llvm.clang/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -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 -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DNS_BLOCK_ASSERTIONS=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=8.0 -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -iquote /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-generated-files.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-own-target-headers.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-all-target-headers.hmap -iquote /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/B4i\ Example-project-headers.hmap -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/include -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_cover.d --serialize-diagnostics /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_cover.dia -c /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/B4iProject/LS_cover.m -o /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_cover.o

Ld Payload/B4i\ Example.app/B4i\ Example normal armv7
    cd /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>
    export IPHONEOS_DEPLOYMENT_TARGET=8.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk -L/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload -L../../Libs -F/Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload -F../../Libs -filelist /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/B4i\ Example.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=8.0 -Xlinker -object_path_lto -Xlinker /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/B4i\ Example_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lCore -framework Foundation -framework CoreGraphics -framework UIKit -framework AVFoundation -ljpush-ios-3.0.2 -ljcore-ios-1.1.1 -liDebug2 -Xlinker -dependency_info -Xlinker /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/B4i\ Example_dependency_info.dat -o /Users/guojs/Desktop/b4i/B4iBuildServer/UploadedProjects/<user id>/Payload/B4i\ Example.app/B4i\ Example
ld: library not found for -ljpush-ios-3.0.2
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error: ** BUILD FAILED **


The following build commands failed:
    Ld Payload/B4i\ Example.app/B4i\ Example normal armv7
(1 failure)
 
Upvote 0
Top