Help fixing build with admob extension

ho88it

Member
I am working on a project which I am trying to test on an iOS device. There are a couple of issues, however. Firstly, my game has admob implemented into it. Admob is set up properly for android devices, I know this because I have successfully tested it on an android virtual device. However, when I click the play button in gms2 with an iOS target selected, it opens the project in Xcode, but I have an error that appears right off the start, without me making any changes in Xcode. Here it is:
Code:
ld: warning: Could not find or use auto-linked framework 'FBLPromises'
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_JSContext", referenced from:
      objc-class-ref in GoogleMobileAds(GADOMIDLightJSExecutor.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How can I fix this, while at the same time not causing other issues? If I remove admob from my game completely, it runs on the device, so I know the issue is in the admob implementation somewhere. I can provide more info upon request.

Also, when I removed admob and got the game to run on the iOS virtual device, it ran very slowly, which was strange since it did not run slowly at all on the android virtual device. Could this be because my Mac is older than my PC, or should I be worried about my project itself?

Again, I can provide more error info upon request, just tell me what you need to see. Any help would be greatly appreciated. Thanks!
 

ho88it

Member
Hi @ho88it

I think that you skipped the Cocoapods frameworks
Please check this post: https://help.yoyogames.com/hc/en-us/articles/360008958858-iOS-and-tvOS-Using-CocoaPods

Please let us know if that fixed your issues

Regards
Hello. Thank you for the reply. I have started the article you recommended, and I have a quick question. When it says,

"This will give you something like the following as a return:

/Users/<username>/.gem/ruby/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods.rb

You only need the first part of the path listed, which you can now add into your .profile file with the following format:

export PATH=/Users/<username>/.gem/ruby/2.6.0/bin:$PATH"

My path does not look exactly like that. It looks more like this: /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods.rb

Why did this happen. I may have made the mistake of using the sudo install method, I started doin it like that, and then noticed where it said not to do that, so I canceled the command while it was running. Is that why my path looks different, or is this something else?
 
seems like the path you are looking for to add is:

export PATH= /Library/Ruby/Gems/2.6.0/bin:$PATH

though I cannot guarantee it will work since you need to install CocoaPods in a sudo-less version 🤔
 

ho88it

Member
I went back through the article, and figured out what went wrong there. However, I am having one more issue. I press play in game maker, and Xcode fails to open, and I get this message:
Code:
Pod install result: [33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    [0m
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:105:in `markdown_podfile'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface/error_report.rb:30:in `report'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:66:in `report_error'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    from /Users/jacobgraham/.gem/bin/pod:23:in `load'
    from /Users/jacobgraham/.gem/bin/pod:23:in `<main>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/unicode_normalize/normalize.rb:141:in `normalize': Unicode Normalization not appropriate for ASCII-8BIT (Encoding::CompatibilityError)
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `unicode_normalize'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:166:in `installation_root'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:226:in `podfile_path'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/config.rb:205:in `podfile'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:160:in `verify_podfile_exists!'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:46:in `run'
    from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    from /Users/jacobgraham/.gem/ruby/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    from /Users/jacobgraham/.gem/bin/pod:23:in `load'
    from /Users/jacobgraham/.gem/bin/pod:23:in `<main>'
I tried adding export LANG=en_US.UTF-8 to the .profile file and restarting, but I still got the same message. Any ideas on how to fix this?
 
Top