iOS Tutorial Facebook Mediation With Admob

Hello,

With the great help from Erel, I want to post a very short and easy tutorial for showing facebook audience network ads on our iOS apps. This will be a short one as I described every step very detailed with android tutorial.

First things to do are do the procedures 3,4 and 5 as described in android tutorial for the iOS. You choose ios platform instead of android. Create ad units for ios and edit your mediation settings on admob.:
https://www.b4x.com/android/forum/threads/admob-mediation-with-facebook.77605/

After you complete those steps add these lines to b4i region attributes:

B4X:
#AdditionalLib: FacebookAdapter.framework
#AdditionalLib: FBAudienceNetwork.framework

(The files are added to hosted builder thanks to Erel) ,
-------
If you are using local mac you can find the FAN framework from facebook sdk and adapter from here:
https://bintray.com/google/mobile-ads-adapters-ios/FacebookAdapter#read

Just navigate to files and download the zip. Extract the framework.
-------

That's all. Facebook ads will start to show after some hours. If you don't have any approved reviews before you have to send the app to review as described in android tutorial sections 7 and 8.

Minimum build version must be 6.0 for FAN ads.

Thanks to Erel for all his help and uploading the files to hosted builder.

Regards
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Thank you tufanv!

A tip about frameworks: don't unzip the iOS frameworks on a PC. This causes the frameworks to be corrupted. I think that it is related to symbolic links that are inside the frameworks.

If you want to upload a framework to the hosted builders then you need to send me a zip file (other formats will not work) created on a Mac computer with the framework as a top folder in the zip file. There could be multiple frameworks in the same zip file.
For example:

SS-2017-03-28_16.46.50.png
 

tufanv

Expert
Licensed User
Longtime User
Hi,

I am trying to implement this again

there are two Audiencenetwork frameworks in the zip, one under static and one under dynamic. Which one should I use ?
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
I am using local mac builder 5.50 with b4i 5.81 , I have found the adapter and audience networks sdks and added them to my project with :,

B4X:
    #AdditionalLib: FacebookAdapter.framework
    #AdditionalLib: FBAudienceNetwork.framework

I get this error when I add above two lines:

B4X:
B4i Version: 5.81
Parsing code.    (0.09s)
Building folders structure.    (0.01s)
Compiling code.    (0.09s)
Compiling layouts code.    (0.00s)
Building Xcode project    (0.17s)
Sending data to remote compiler.    Error
Out: Build settings from command line:
    ARCHS = armv7 arm64
    CODE_SIGN_IDENTITY = iPhone Distribution: TUFAN VATANDOST (AXD74RVYT3)
    CONFIGURATION_BUILD_DIR = /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload
    OTHER_CODE_SIGN_FLAGS = --keychain <user id>
    PRODUCT_NAME = result
    PROVISIONING_PROFILE = 20b08714-d80c-4895-8b67-9d13a835309c

note: Using new build system
note: Planning build
note: Constructing build description
Build system information
warning: Skipping duplicate build file in Copy Bundle Resources build phase: /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/tr.lproj/InfoPlist.strings (in target 'B4iProject')



CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_1.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/LS_1.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/armv7 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_1.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_1.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/LS_1.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/LS_1.o

CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/main.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/main.o

CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_main.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_main.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_main.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_main.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_main.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_main.o

CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_keyvaluestore.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_keyvaluestore.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_keyvaluestore.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_keyvaluestore.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_keyvaluestore.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_keyvaluestore.o

CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httputils2service.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_httputils2service.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httputils2service.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httputils2service.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_httputils2service.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httputils2service.o

CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_httpjob.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/b4i_httpjob.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/b4i_httpjob.o

CompileC /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/LS_1.o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/LS_1.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export LANG=en_US.US-ASCII
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -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/0v/rwshqj7d6tgd2jtlx6dnd3w40000gn/C/org.llvm.clang/ModuleCache.noindex/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 -Wno-objc-interface-ivars -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 -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 -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DB4I_VERSION=11 -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.3 -g -fvisibility=hidden -Wno-sign-conversion -Wno-infinite-recursion -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-generated-files.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-own-target-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-all-target-headers.hmap -iquote /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/result-project-headers.hmap -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload/include -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources/arm64 -I/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/DerivedSources -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -MMD -MT dependencies -MF /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/LS_1.d --serialize-diagnostics /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/LS_1.dia -c /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/B4iProject/LS_1.m -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/LS_1.o

Ld /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/result normal arm64 (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export IPHONEOS_DEPLOYMENT_TARGET=9.3
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -L../../Libs -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -filelist /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/result.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.3 -Xlinker -object_path_lto -Xlinker /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/result_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lCore -framework Foundation -framework CoreGraphics -framework UIKit -liHttp -liJSON -liHUD -liUI8 -liSQL -liRandomAccessFile -liEncryption -liPhone -liStringUtils -liFirebaseAnalytics -liFirebaseNotifications -liAdMob -liDateUtils -liStore -framework AVFoundation -lsqlite3 -lz -framework MessageUI -framework CoreMotion -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework GoogleAppMeasurement -framework GoogleUtilities -framework nanopb -framework FirebaseMessaging -framework Protobuf -framework AudioToolbox -framework AdSupport -framework CoreGraphics -framework CoreTelephony -framework EventKit -framework EventKitUI -framework StoreKit -framework SystemConfiguration -framework CoreMedia -framework GoogleMobileAds -framework MediaPlayer -framework SafariServices -framework CoreBluetooth -framework MobileCoreServices -framework FBSDKCoreKit -framework FacebookAdapter -framework FBAudienceNetwork -Xlinker -dependency_info -Xlinker /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/result_dependency_info.dat -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/result
undef: _kGADAdLoaderAdTypeUnifiedNative
undef: _GADClosestValidSizeForAdSizes
undef: _OBJC_CLASS_$_GADUnifiedNativeAdView
undef: _OBJC_CLASS_$_GADNativeAdViewAdOptions
Undefined symbols for architecture arm64:
  "_kGADAdLoaderAdTypeUnifiedNative", referenced from:
      -[GADMAdapterFacebook getNativeAdWithAdTypes:options:] in FacebookAdapter(GADMAdapterFacebook.o)
  "_GADClosestValidSizeForAdSizes", referenced from:
      -[GADFBBannerAd getBannerWithSize:] in FacebookAdapter(GADFBBannerAd.o)
  "_OBJC_CLASS_$_GADUnifiedNativeAdView", referenced from:
      objc-class-ref in FacebookAdapter(GADFBNativeRenderer.o)
  "_OBJC_CLASS_$_GADNativeAdViewAdOptions", referenced from:
      objc-class-ref in FacebookAdapter(GADFBUnifiedNativeAd.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Ld /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/result normal armv7 (in target: B4iProject)
    cd /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>
    export IPHONEOS_DEPLOYMENT_TARGET=9.3
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -L/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -L../../Libs -F/Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/Payload -F../../Libs -filelist /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/result.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.3 -Xlinker -object_path_lto -Xlinker /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/result_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -lCore -framework Foundation -framework CoreGraphics -framework UIKit -liHttp -liJSON -liHUD -liUI8 -liSQL -liRandomAccessFile -liEncryption -liPhone -liStringUtils -liFirebaseAnalytics -liFirebaseNotifications -liAdMob -liDateUtils -liStore -framework AVFoundation -lsqlite3 -lz -framework MessageUI -framework CoreMotion -framework FIRAnalyticsConnector -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseInstanceID -framework GoogleAppMeasurement -framework GoogleUtilities -framework nanopb -framework FirebaseMessaging -framework Protobuf -framework AudioToolbox -framework AdSupport -framework CoreGraphics -framework CoreTelephony -framework EventKit -framework EventKitUI -framework StoreKit -framework SystemConfiguration -framework CoreMedia -framework GoogleMobileAds -framework MediaPlayer -framework SafariServices -framework CoreBluetooth -framework MobileCoreServices -framework FBSDKCoreKit -framework FacebookAdapter -framework FBAudienceNetwork -Xlinker -dependency_info -Xlinker /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/result_dependency_info.dat -o /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/armv7/result


Error: ** BUILD FAILED **


The following build commands failed:
    Ld /Users/mtv/Desktop/B4iBuildServer2/UploadedProjects/<user id>/build/B4iProject.build/Release-iphoneos/B4iProject.build/Objects-normal/arm64/result normal arm64
(1 failure)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm able to compile and run with FBAudienceNetwork and FacebookAdapter frameworks.

Make sure to use the static framework for FBAudienceNetwork.

Additional libs:
B4X:
#PlistExtra: <key>GADIsAdManagerApp</key><true/>
#AdditionalLib: libsqlite3.dylib
#AdditionalLib: libz.dylib
#AdditionalLib: WebKit.framework
#AdditionalLib: FBAudienceNetwork.framework.3
#AdditionalLib: FBSDKCoreKit.framework.3
#AdditionalLib: FacebookAdapter.framework.3
#AdditionalLib: libxml2.dylib

Referenced libraries:
iAdMob
iXUI
iXUI2D

Firebase + Facebook SDK: https://www.b4x.com/android/forum/threads/107435

iXUI2D is required to enable C++ modules. Once you get it working I can explain how you can remove this dependency.
 

tufanv

Expert
Licensed User
Longtime User
For ixui and ixui2d I am getting :

B4X:
B4iProject/b4i_richstring.h:16:9: fatal error: 'iXUI2D.h' file not found
#import "iXUI2D.h"
        ^~~~~~~~~~
1 error generated.

altough .h files are in the libs folder of my local mac. any idea ?

on my pc ixui verison is .190 and the h file in mac is also 1.90

full error here : https://easyupload.io/874dc8

---

If I don't activate ixui and ixui2d I can compile the app with facebook audeince network without a problem, I only get :

B4X:
FBSDKLog: Missing [FBSDKAppEvents appEventsState.appID] for [FBSDKAppEvents flushOnMainQueue:]

this error. I need to add these lines described in step 4 to plist: https://developers.facebook.com/docs/app-events/getting-started-app-events-ios/

I tried like this :

B4X:
    #PlistExtra:<key>CFBundleURLSchemes</key><string>fb4315833942348xx</string>
    #PlistExtra:<key>FacebookAppID</key><string>4315833942348xx</string>
    #PlistExtra:<key>FacebookDisplayName</key><string>CanliDoviz</string>

But I get:
FBSDKLog: Failed to send AppEvents: Error Domain=com.facebook.sdk.core Code=7 "(null)" UserInfo={com.facebook.sdk:FBSDKGraphRequestErrorParsedJSONResponseKey=(
), com.facebook.sdk:FBSDKGraphRequestErrorHTTPStatusCodeKey=400}

this now, there are 2 types of plist entries in step 4 maybe I am using it worng ?
 
Last edited:

tufanv

Expert
Licensed User
Longtime User
All that I can say it that it looks like a configuration error with Facebook SDK.
thanks, are my plist entries correct according to step 4 so I can try different things isntead of focusing on this ?
 

tufanv

Expert
Licensed User
Longtime User
After 2 years I could make it work :) It was a bit complicated but if someone needs it they can contact me and I can help it out. I wont make a tutuorial because I think not so much people is using this.
 
Top