• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

iOS 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?
 

xDGameStudios

GMC Member
YYG Staff
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?
 

ho88it

Member
Update: After seeking support from yoyogames staff, I eventually got something working. I was told to follow these steps:
0. Install cocoapods (https://help.yoyogames.com/hc/en-us/articles/360008958858-iOS-and-tvOS-Using-CocoaPods)
1. Generate both podfile and podfile.lock
2. Run from GMS2 IDE (IDE will hang saying pod command not found)
3. Stop the building process
4. open a terminal and navigate to the xcode project and run the command pod install manually (I needed to give the full path to the command, like this: /Users/<User>/.gem/ruby/2.6.0/bin/pod install
5. Open the xcode project but the one that end in .xcworkspace
6. They should now be able to build
This needs to be done every time for a new build, sadly.
 
Update: After seeking support from yoyogames staff, I eventually got something working. I was told to follow these steps:
0. Install cocoapods (https://help.yoyogames.com/hc/en-us/articles/360008958858-iOS-and-tvOS-Using-CocoaPods)
1. Generate both podfile and podfile.lock
2. Run from GMS2 IDE (IDE will hang saying pod command not found)
3. Stop the building process
4. open a terminal and navigate to the xcode project and run the command pod install manually (I needed to give the full path to the command, like this: /Users/<User>/.gem/ruby/2.6.0/bin/pod install
5. Open the xcode project but the one that end in .xcworkspace
6. They should now be able to build
This needs to be done every time for a new build, sadly.
Good day friend, could you help me & share me the path of xcode in which you run the manual installation of cocoa pod? I'm confused, possibly I'm installing it in another path, that would help me a lot
 
I have two paths, one that says /Users/ernestoromero/gamemakerstudio2/GMS2IOS/JALAS_O_MAMAS/JALAS_O_MAMAS/ & another that has an additional path to "FromPC" by the way, I can't find the .xcworkspace file anywhere
 
Top