[PRIORITY] New iOS Plugin for 3.2.4/4.0

Soon Godot will receive the new Plugin System as Android: https://github.com/godotengine/godot/pull/41230
https://github.com/godotengine/godot/pull/41340
The goal of this repository is being updated with the newest version of Godot, and this new Plugin System for iOS is very welcomed because will be more easy to develop for iOS.
Tutorial: ?

Does anyone have news when we can expect this to happen? Do we have to wait for Godot 4.0?

Does anyone have news when we can expect this to happen? Do we have to wait for Godot 4.0?

hey @war1an , we will not need to wait for Godot 4.0, but I talked to the iOS plugin's creator and probably will only happen on 3.2.5 version or with lucky on 3.2.4 (I would give about 1 ~ 5 months to this happen), i'm studying how we can do this when a beta version comes, for now we still need to use "modules"
To use AdMob on Godot iOS, check the tutorial here: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS#ios-v300

hey @war1an , we will not need to wait for Godot 4.0, but I talked to the iOS plugin's creator and probably will only happen on 3.2.5 version or with lucky on 3.2.4 (I would give about 1 ~ 5 months to this happen), i'm studying how we can do this when a beta version comes, for now we still need to use "modules"
To use AdMob on Godot iOS, check the tutorial here: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS#ios-v300

Since https://github.com/godotengine/godot/pull/41340 has been merged, I think you can start working on migrating module to plugin.
Since you have updated the code to work with 3.2.4 beta everything should be pretty straightforward.

Since https://github.com/godotengine/godot/pull/41340 has been merged, I think you can start working on migrating module to plugin.
Since you have updated the code to work with 3.2.4 beta everything should be pretty straightforward.

I was just reading the highlights of the beta 6 update when I saw iOS plugins support I'm very excited! Thank you guys for the hard work @naithar and @gustavottc for the Admob plugin! This system is a very welcome change.

I was just reading the highlights of the beta 6 update when I saw iOS plugins support I'm very excited! Thank you guys for the hard work @naithar and @gustavottc for the Admob plugin! This system is a very welcome change.

hey @naithar , what a coincidence! i'm going to start working on the plugins now, yesterday i finished the UMP for Android and iOS and was about to start the plugin for iOS
I just found beta6 here: https://downloads.tuxfamily.org/godotengine/3.2.4/beta6/
i should consider this PR too? https://github.com/godotengine/godot/pull/43557 or just the https://github.com/godotengine/godot/pull/41340?

hey @naithar , what a coincidence! i'm going to start working on the plugins now, yesterday i finished the UMP for Android and iOS and was about to start the plugin for iOS
I just found beta6 here: https://downloads.tuxfamily.org/godotengine/3.2.4/beta6/
i should consider this PR too? https://github.com/godotengine/godot/pull/43557 or just the https://github.com/godotengine/godot/pull/41340?

https://github.com/godotengine/godot/pull/43557 wouldn't give you any benefit really, since you don't seem to be using anything that's related to AppDelegate. But I have a PushNotification plugin example, that might be of some use if you require extending default AppDelegate.

https://github.com/godotengine/godot/pull/43557 wouldn't give you any benefit really, since you don't seem to be using anything that's related to AppDelegate. But I have a PushNotification plugin example, that might be of some use if you require extending default AppDelegate.

And i use AppDelegate

But if some error appear due app_delegate i will check this repo: https://github.com/naithar/godot_ios_plugin_apns

And i use AppDelegate

But if some error appear due app_delegate i will check this repo: https://github.com/naithar/godot_ios_plugin_apns

A strange thing is this: the frameworks are added and i didn't link:

I also added the path into Library Search Path, Header Search Path and Framework Search Path
Tried clean, build, restart Xcode and nothing

A strange thing is this: the frameworks are added and i didn't link:

I also added the path into Library Search Path, Header Search Path and Framework Search Path
Tried clean, build, restart Xcode and nothing

Nvm, i fixed

Nvm, i fixed

@naithar everything great, except for this: the '.a' is from Xcode build

@naithar everything great, except for this: the '.a' is from Xcode build

@war1an @brendonion please try it out if you guys want to
admob_plugin.zip
Need to: Create a folder called "ios/plugins" and place the content inside this ".zip" into this folder, will be like that:

And then into Export Project:

After that, do these steps: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/tree/iOS-Plugin#ios-v300 right on "Add the following frameworks to the project linking"

@war1an @brendonion please try it out if you guys want to
admob_plugin.zip
Need to: Create a folder called "ios/plugins" and place the content inside this ".zip" into this folder, will be like that:

And then into Export Project:

After that, do these steps: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/tree/iOS-Plugin#ios-v300 right on "Add the following frameworks to the project linking"

@naithar , btw i'm using some frameworks like: JavaScriptCore and all frameworks by GoogleMobileAdsSdk (GoogleMobileAds, User Messaging Platform etc...)
I'm also editing the ".plist", adding these:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
<key>SKAdNetworkItems</key>
  <array>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cstr6suwn9.skadnetwork</string>
    </dict>
  </array>

I need to put these things on the ".gdip" file?

Actually it's working editing directly inside Xcode project

@naithar , btw i'm using some frameworks like: JavaScriptCore and all frameworks by GoogleMobileAdsSdk (GoogleMobileAds, User Messaging Platform etc...)
I'm also editing the ".plist", adding these:
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
<key>SKAdNetworkItems</key>
  <array>
    <dict>
      <key>SKAdNetworkIdentifier</key>
      <string>cstr6suwn9.skadnetwork</string>
    </dict>
  </array>

I need to put these things on the ".gdip" file?

Actually it's working editing directly inside Xcode project

@gustavottc I downloaded Godot_v3.2.4-beta6_osx.universal.zip. Created the ios/plugin folder and unzip the content inside (wouldn't be better if the plugin has it's folder like ios/plugin/admob ?). Downloaded the iOS the export template but I don't have a plugin section inside the settings.

@gustavottc I downloaded Godot_v3.2.4-beta6_osx.universal.zip. Created the ios/plugin folder and unzip the content inside (wouldn't be better if the plugin has it's folder like ios/plugin/admob ?). Downloaded the iOS the export template but I don't have a plugin section inside the settings.

@war1an plugins can be placed inside admob directory to make grouping better. Also plugin is looking for libadmob_plugin.a, not libadmob.plugin.a so renaming should fix it for you.
@gustavottc under linked, embedded and system you can list frameworks so that plugin users wouldn't have to place libraries manually in their project. Some things might not work that good (like making framework optional), but should cover some use cases.
plist section currently supports only string values, so there is no way to automate .plist modification in your case.

@war1an plugins can be placed inside admob directory to make grouping better. Also plugin is looking for libadmob_plugin.a, not libadmob.plugin.a so renaming should fix it for you.
@gustavottc under linked, embedded and system you can list frameworks so that plugin users wouldn't have to place libraries manually in their project. Some things might not work that good (like making framework optional), but should cover some use cases.
plist section currently supports only string values, so there is no way to automate .plist modification in your case.

@gustavottc you might also want to include support for both release and debug configurations. This is done by compiling libraries with both configurations and naming them as <lib_name>.release.a and <lib_name>.debug.a.

@gustavottc you might also want to include support for both release and debug configurations. This is done by compiling libraries with both configurations and naming them as <lib_name>.release.a and <lib_name>.debug.a.

I did it, but Godot is giving me this error:  Invalid plugin config file admob_plugin.gdip

And do you know how to solve this error? https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761714027 only appear when Xcode builds
And when Xcode builds, he do a single binary file with release a debug for all platform(x86_64, armv7, arm64)?

I did it, but Godot is giving me this error:  Invalid plugin config file admob_plugin.gdip

And do you know how to solve this error? https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761714027 only appear when Xcode builds
And when Xcode builds, he do a single binary file with release a debug for all platform(x86_64, armv7, arm64)?

I did it, but Godot is giving me this error: Invalid plugin config file admob_plugin.gdip

There is no need to change binary value. Godot will handle different targets himself, just provide correctly named static libraries. If binary is libadmob_plugin.a, you should just place libadmob_plugin.release.a and libadmob_plugin.debug.a next to the .gdip file.

And do you know how to solve this error? #27 (comment) only appear when Xcode builds

Seems like you need to exclude specific architectures when building with Xcode.

And when Xcode builds, he do a single binary file with release a debug for all platform(x86_64, armv7, arm64)?

Xcode creates a single binary for targeted platform and configuration that you've specified. If you build for debug device, it will result in such. But every library will use the same name overriding the last one.
You should probably use scons, since Xcode might be doing something that's not really needed for Godot's plugin.

I did it, but Godot is giving me this error: Invalid plugin config file admob_plugin.gdip

There is no need to change binary value. Godot will handle different targets himself, just provide correctly named static libraries. If binary is libadmob_plugin.a, you should just place libadmob_plugin.release.a and libadmob_plugin.debug.a next to the .gdip file.

And do you know how to solve this error? #27 (comment) only appear when Xcode builds

Seems like you need to exclude specific architectures when building with Xcode.

And when Xcode builds, he do a single binary file with release a debug for all platform(x86_64, armv7, arm64)?

Xcode creates a single binary for targeted platform and configuration that you've specified. If you build for debug device, it will result in such. But every library will use the same name overriding the last one.
You should probably use scons, since Xcode might be doing something that's not really needed for Godot's plugin.

Also note that debug Godot's template is actually a template built with release_debug target, so you might want to change SConstruct file accordingly or wait until I finish migration for builtin plugins https://github.com/godotengine/godot/pull/45252.

Also note that debug Godot's template is actually a template built with release_debug target, so you might want to change SConstruct file accordingly or wait until I finish migration for builtin plugins https://github.com/godotengine/godot/pull/45252.

I added all framework but I can't run the project successfully.
The first error was:
*********** main.m
running app main
2021-01-17 15:47:04.069186+0200 Poing-Studios[23738:2181112] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/CB7A76A2-FDD1-4C9C-BB09-BE61E38538AE/Poing-Studios.app

which I fix by adding
<array>
	<string>remote-notification</string>
</array>

Then the application fails to install on my device, here is the error message:
*********** main.m
running app main
Path: /var/containers/Bundle/Application/45170E80-E25A-4B45-AB06-2F1518A44058/Poing-Studios.app
godot_iphone /var/containers/Bundle/Application/45170E80-E25A-4B45-AB06-2F1518A44058/Poing-Studios.app/Poing-Studios
cwd /private/var/containers/Bundle/Application/45170E80-E25A-4B45-AB06-2F1518A44058/Poing-Studios.app
os created
setting data dir to /var/mobile/Containers/Data/Application/EFD9E15B-FCED-4963-BEE5-9CF38FBFB183/Documents from /var/mobile/Containers/Data/Application/EFD9E15B-FCED-4963-BEE5-9CF38FBFB183/Documents
setup 0
2021-01-17 15:49:59.980625+0200 Poing-Studios[23773:2183148] Metal GPU Frame Capture Enabled
2021-01-17 15:49:59.981036+0200 Poing-Studios[23773:2183148] Metal API Validation Enabled
2021-01-17 15:50:00.229344+0200 Poing-Studios[23773:2183148] Setting up an OpenGL ES 2.0 context.
2021-01-17 15:50:00.240494+0200 Poing-Studios[23773:2183148] failed to make complete framebuffer object 8cd6
2021-01-17 15:50:00.240630+0200 Poing-Studios[23773:2183148] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 15:50:00.877427+0200 Poing-Studios[23773:2183148] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 15:50:00.877513+0200 Poing-Studios[23773:2183148]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 15:50:01.072037+0200 Poing-Studios[23773:2183396]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~3347511713
2021-01-17 15:50:01.198711+0200 Poing-Studios[23773:2183396]  - <Google>[I-ACS023007] Analytics v.60900000 started
2021-01-17 15:50:01.199161+0200 Poing-Studios[23773:2183396]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 15:50:01.947571+0200 Poing-Studios[23773:2183148] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 15:50:01.973059+0200 Poing-Studios[23773:2183148] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 15:50:01.993983+0200 Poing-Studios[23773:2183148] OpenGL ES Batching: ON
2021-01-17 15:50:02.123736+0200 Poing-Studios[23773:2183148]
2021-01-17 15:50:02.470125+0200 Poing-Studios[23773:2183148] init admob plugin
2021-01-17 15:50:02.470281+0200 Poing-Studios[23773:2183148] initialize admob
2021-01-17 15:50:02.470501+0200 Poing-Studios[23773:2183148] is admob_enabled?
2021-01-17 15:50:02.470528+0200 Poing-Studios[23773:2183148] init cool
2021-01-17 15:50:02.478858+0200 Poing-Studios[23773:2183148] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282881d00
2021-01-17 15:50:02.497984+0200 Poing-Studios[23773:2183148] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282881d00'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x10548eef4 0x1054914bc 0x106489528 0x10648ae6c 0x10548feec 0x105267888 0x1052692e4 0x104ffcbf4 0x104ffcb4c 0x10422e910 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x1040fe02c)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282881d00'
terminating with uncaught exception of type NSException

I have added inside the _ready() these print messages is admob_enabled? and init cool:
if admob_enabled:
		print("is admob_enabled?")
		if (Engine.has_singleton("AdMob")):
			print("init cool")

I'm testing with a real device, not an emulator.

I added all framework but I can't run the project successfully.
The first error was:
*********** main.m
running app main
2021-01-17 15:47:04.069186+0200 Poing-Studios[23738:2181112] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/CB7A76A2-FDD1-4C9C-BB09-BE61E38538AE/Poing-Studios.app

which I fix by adding
<array>
	<string>remote-notification</string>
</array>

Then the application fails to install on my device, here is the error message:
*********** main.m
running app main
Path: /var/containers/Bundle/Application/45170E80-E25A-4B45-AB06-2F1518A44058/Poing-Studios.app
godot_iphone /var/containers/Bundle/Application/45170E80-E25A-4B45-AB06-2F1518A44058/Poing-Studios.app/Poing-Studios
cwd /private/var/containers/Bundle/Application/45170E80-E25A-4B45-AB06-2F1518A44058/Poing-Studios.app
os created
setting data dir to /var/mobile/Containers/Data/Application/EFD9E15B-FCED-4963-BEE5-9CF38FBFB183/Documents from /var/mobile/Containers/Data/Application/EFD9E15B-FCED-4963-BEE5-9CF38FBFB183/Documents
setup 0
2021-01-17 15:49:59.980625+0200 Poing-Studios[23773:2183148] Metal GPU Frame Capture Enabled
2021-01-17 15:49:59.981036+0200 Poing-Studios[23773:2183148] Metal API Validation Enabled
2021-01-17 15:50:00.229344+0200 Poing-Studios[23773:2183148] Setting up an OpenGL ES 2.0 context.
2021-01-17 15:50:00.240494+0200 Poing-Studios[23773:2183148] failed to make complete framebuffer object 8cd6
2021-01-17 15:50:00.240630+0200 Poing-Studios[23773:2183148] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 15:50:00.877427+0200 Poing-Studios[23773:2183148] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 15:50:00.877513+0200 Poing-Studios[23773:2183148]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 15:50:01.072037+0200 Poing-Studios[23773:2183396]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~3347511713
2021-01-17 15:50:01.198711+0200 Poing-Studios[23773:2183396]  - <Google>[I-ACS023007] Analytics v.60900000 started
2021-01-17 15:50:01.199161+0200 Poing-Studios[23773:2183396]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 15:50:01.947571+0200 Poing-Studios[23773:2183148] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 15:50:01.973059+0200 Poing-Studios[23773:2183148] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 15:50:01.993983+0200 Poing-Studios[23773:2183148] OpenGL ES Batching: ON
2021-01-17 15:50:02.123736+0200 Poing-Studios[23773:2183148]
2021-01-17 15:50:02.470125+0200 Poing-Studios[23773:2183148] init admob plugin
2021-01-17 15:50:02.470281+0200 Poing-Studios[23773:2183148] initialize admob
2021-01-17 15:50:02.470501+0200 Poing-Studios[23773:2183148] is admob_enabled?
2021-01-17 15:50:02.470528+0200 Poing-Studios[23773:2183148] init cool
2021-01-17 15:50:02.478858+0200 Poing-Studios[23773:2183148] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282881d00
2021-01-17 15:50:02.497984+0200 Poing-Studios[23773:2183148] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282881d00'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x10548eef4 0x1054914bc 0x106489528 0x10648ae6c 0x10548feec 0x105267888 0x1052692e4 0x104ffcbf4 0x104ffcb4c 0x10422e910 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x1040fe02c)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282881d00'
terminating with uncaught exception of type NSException

I have added inside the _ready() these print messages is admob_enabled? and init cool:
if admob_enabled:
		print("is admob_enabled?")
		if (Engine.has_singleton("AdMob")):
			print("init cool")

I'm testing with a real device, not an emulator.

@war1an if you remove the admob library and comment out admob_plugin_init and admob_plugin_deinit in dummy.cpp file in Xcode, does it crash?

I added all framework but I can't run the project successfully.
The first error was:
*********** main.m
running app main
2021-01-17 15:47:04.069186+0200 Poing-Studios[23738:2181112] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/CB7A76A2-FDD1-4C9C-BB09-BE61E38538AE/Poing-Studios.app

which I fix by adding
<array>
	<string>remote-notification</string>
</array>

This is just a warning, shouldn't really cause you any trouble other than just writing a log.

@war1an if you remove the admob library and comment out admob_plugin_init and admob_plugin_deinit in dummy.cpp file in Xcode, does it crash?

I added all framework but I can't run the project successfully.
The first error was:
*********** main.m
running app main
2021-01-17 15:47:04.069186+0200 Poing-Studios[23738:2181112] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/CB7A76A2-FDD1-4C9C-BB09-BE61E38538AE/Poing-Studios.app

which I fix by adding
<array>
	<string>remote-notification</string>
</array>

This is just a warning, shouldn't really cause you any trouble other than just writing a log.

if you remove the admob library and comment out admob_plugin_init and admob_plugin_deinit in dummy.cpp file in Xcode, does it crash?

The app was installed successfully

if you remove the admob library and comment out admob_plugin_init and admob_plugin_deinit in dummy.cpp file in Xcode, does it crash?

The app was installed successfully

The app was installed successfully

You mean there is no -[__NSCFString containsObject:]: unrecognized selector sent to instance error, right?
Then, I guess @gustavottc have changed the code somehow, that results in crashing.

The app was installed successfully

You mean there is no -[__NSCFString containsObject:]: unrecognized selector sent to instance error, right?
Then, I guess @gustavottc have changed the code somehow, that results in crashing.

Yeah, everything is fine. I got the following:
*********** main.m
running app main
Path: /var/containers/Bundle/Application/8EA6A804-3DA9-4770-82A1-0C410FE4D41F/Poing-Studios.app
godot_iphone /var/containers/Bundle/Application/8EA6A804-3DA9-4770-82A1-0C410FE4D41F/Poing-Studios.app/Poing-Studios
cwd /private/var/containers/Bundle/Application/8EA6A804-3DA9-4770-82A1-0C410FE4D41F/Poing-Studios.app
os created
setting data dir to /var/mobile/Containers/Data/Application/01521AB1-89E1-4A5E-90C7-70B1884FE739/Documents from /var/mobile/Containers/Data/Application/01521AB1-89E1-4A5E-90C7-70B1884FE739/Documents
setup 0
2021-01-17 16:15:06.674320+0200 Poing-Studios[24061:2195141] Metal GPU Frame Capture Enabled
2021-01-17 16:15:06.674752+0200 Poing-Studios[24061:2195141] Metal API Validation Enabled
2021-01-17 16:15:06.767338+0200 Poing-Studios[24061:2195141] Setting up an OpenGL ES 2.0 context.
2021-01-17 16:15:06.768409+0200 Poing-Studios[24061:2195141] failed to make complete framebuffer object 8cd6
2021-01-17 16:15:06.768491+0200 Poing-Studios[24061:2195141] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 16:15:06.820878+0200 Poing-Studios[24061:2195141] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 16:15:06.820969+0200 Poing-Studios[24061:2195141]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 16:15:07.004712+0200 Poing-Studios[24061:2195141] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 16:15:07.013422+0200 Poing-Studios[24061:2195141] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 16:15:07.023033+0200 Poing-Studios[24061:2195379]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~3347511713
2021-01-17 16:15:07.023954+0200 Poing-Studios[24061:2195379]  - <Google>[I-ACS023007] Analytics v.60900000 started
2021-01-17 16:15:07.024684+0200 Poing-Studios[24061:2195379]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 16:15:07.025420+0200 Poing-Studios[24061:2195141] OpenGL ES Batching: ON
2021-01-17 16:15:07.152314+0200 Poing-Studios[24061:2195141]
2021-01-17 16:15:07.193560+0200 Poing-Studios[24061:2195390]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 16:15:07.209126+0200 Poing-Studios[24061:2195390]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 16:15:07.464296+0200 Poing-Studios[24061:2195141] is admob_enabled?

Yeah, everything is fine. I got the following:
*********** main.m
running app main
Path: /var/containers/Bundle/Application/8EA6A804-3DA9-4770-82A1-0C410FE4D41F/Poing-Studios.app
godot_iphone /var/containers/Bundle/Application/8EA6A804-3DA9-4770-82A1-0C410FE4D41F/Poing-Studios.app/Poing-Studios
cwd /private/var/containers/Bundle/Application/8EA6A804-3DA9-4770-82A1-0C410FE4D41F/Poing-Studios.app
os created
setting data dir to /var/mobile/Containers/Data/Application/01521AB1-89E1-4A5E-90C7-70B1884FE739/Documents from /var/mobile/Containers/Data/Application/01521AB1-89E1-4A5E-90C7-70B1884FE739/Documents
setup 0
2021-01-17 16:15:06.674320+0200 Poing-Studios[24061:2195141] Metal GPU Frame Capture Enabled
2021-01-17 16:15:06.674752+0200 Poing-Studios[24061:2195141] Metal API Validation Enabled
2021-01-17 16:15:06.767338+0200 Poing-Studios[24061:2195141] Setting up an OpenGL ES 2.0 context.
2021-01-17 16:15:06.768409+0200 Poing-Studios[24061:2195141] failed to make complete framebuffer object 8cd6
2021-01-17 16:15:06.768491+0200 Poing-Studios[24061:2195141] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 16:15:06.820878+0200 Poing-Studios[24061:2195141] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 16:15:06.820969+0200 Poing-Studios[24061:2195141]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 16:15:07.004712+0200 Poing-Studios[24061:2195141] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 16:15:07.013422+0200 Poing-Studios[24061:2195141] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 16:15:07.023033+0200 Poing-Studios[24061:2195379]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~3347511713
2021-01-17 16:15:07.023954+0200 Poing-Studios[24061:2195379]  - <Google>[I-ACS023007] Analytics v.60900000 started
2021-01-17 16:15:07.024684+0200 Poing-Studios[24061:2195379]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 16:15:07.025420+0200 Poing-Studios[24061:2195141] OpenGL ES Batching: ON
2021-01-17 16:15:07.152314+0200 Poing-Studios[24061:2195141]
2021-01-17 16:15:07.193560+0200 Poing-Studios[24061:2195390]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 16:15:07.209126+0200 Poing-Studios[24061:2195390]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 16:15:07.464296+0200 Poing-Studios[24061:2195141] is admob_enabled?

@war1an First drag all content inside this admob_plugin.zip into this folder:

After that, add AdMob to your plugins and export:

Then change your .plist: SEARCH FOR: Update your GAMENAME-Info.plist file

Add the -ObjC linker flag to Other Linker Flags in your project's build settings:

After, add the frameworks of GoogleMobileAdsSdk you can download the same that i'm using here (if some error of "framework not found" then: do that and this

If you want to test on Simulator and it's not appearing, do that:

After all that should all work fine:

@war1an First drag all content inside this admob_plugin.zip into this folder:

After that, add AdMob to your plugins and export:

Then change your .plist: SEARCH FOR: Update your GAMENAME-Info.plist file

Add the -ObjC linker flag to Other Linker Flags in your project's build settings:

After, add the frameworks of GoogleMobileAdsSdk you can download the same that i'm using here (if some error of "framework not found" then: do that and this

If you want to test on Simulator and it's not appearing, do that:

After all that should all work fine:

@gustavottc  Just tried with the example app with real device and simulator both failed.
Simulator failed because:
nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-01-17 17:42:43.295806+0200 AdMob[11969:1043872]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 17:42:43.439874+0200 AdMob[11969:1043874]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 17:42:43.479279+0200 AdMob[11969:1043172] on Testing Simulator: Simulator
2021-01-17 17:42:43.480370+0200 AdMob[11969:1043172] maxAdContentRating = GADMaxAdContentRatingGeneral
2021-01-17 17:42:43.492614+0200 AdMob[11969:1043874] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSUserTrackingUsageDescription key with a string value explaining to the user how the app uses this data.
CoreSimulator 732.18.6 - Device: iPhone 8 (AD03FB78-8EA9-47E6-9F17-2D9A56EBB338) - Runtime: iOS 14.3 (18C61) - DeviceType: iPhone 8

Device failed because:
2021-01-17 17:48:33.535907+0200 AdMob[25020:2225470] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282e60940
2021-01-17 17:48:33.550765+0200 AdMob[25020:2225470] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282e60940'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x1054601cc 0x105462794 0x1064b9528 0x1064bae6c 0x1054611c4 0x1054f4bec 0x1054f6648 0x1051e7608 0x1051e7560 0x104419324 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x1042e8a50)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282e60940'
terminating with uncaught exception of type NSException

@gustavottc  Just tried with the example app with real device and simulator both failed.
Simulator failed because:
nw_protocol_get_quic_image_block_invoke dlopen libquic failed
2021-01-17 17:42:43.295806+0200 AdMob[11969:1043872]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 17:42:43.439874+0200 AdMob[11969:1043874]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 17:42:43.479279+0200 AdMob[11969:1043172] on Testing Simulator: Simulator
2021-01-17 17:42:43.480370+0200 AdMob[11969:1043172] maxAdContentRating = GADMaxAdContentRatingGeneral
2021-01-17 17:42:43.492614+0200 AdMob[11969:1043874] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description.  The app's Info.plist must contain an NSUserTrackingUsageDescription key with a string value explaining to the user how the app uses this data.
CoreSimulator 732.18.6 - Device: iPhone 8 (AD03FB78-8EA9-47E6-9F17-2D9A56EBB338) - Runtime: iOS 14.3 (18C61) - DeviceType: iPhone 8

Device failed because:
2021-01-17 17:48:33.535907+0200 AdMob[25020:2225470] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282e60940
2021-01-17 17:48:33.550765+0200 AdMob[25020:2225470] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282e60940'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x1054601cc 0x105462794 0x1064b9528 0x1064bae6c 0x1054611c4 0x1054f4bec 0x1054f6648 0x1051e7608 0x1051e7560 0x104419324 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x1042e8a50)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x282e60940'
terminating with uncaught exception of type NSException

@war1an please show me your .plist file

@war1an please show me your .plist file

@gustavottc here you go

@gustavottc here you go

@war1an is missing:
https://developers.google.com/admob/ios/ios14#skadnetwork
and
https://developers.google.com/admob/ios/ios14#request
after include these please try again

@war1an is missing:
https://developers.google.com/admob/ios/ios14#skadnetwork
and
https://developers.google.com/admob/ios/ios14#request
after include these please try again

Also change your GADApplicationIdentifier to this: "ca-app-pub-3940256099942544~1458002511" (official for testing)

Also change your GADApplicationIdentifier to this: "ca-app-pub-3940256099942544~1458002511" (official for testing)

@gustavottc I've temporarily created a repo for plugins here: https://github.com/naithar/godot_plugins_ios
You can use SConstruct file to build your plugin as well as generate-xcframework.sh script to build .xcframework, once PR for it is merged.
You'll just have to modify scons config a little to support your plugin. Right now it's limited by opts.Add(EnumVariable('plugin', 'Plugin to build', '', ['', 'arkit', 'camera', 'icloud', 'gamecenter', 'inappstore']))

@gustavottc I've temporarily created a repo for plugins here: https://github.com/naithar/godot_plugins_ios
You can use SConstruct file to build your plugin as well as generate-xcframework.sh script to build .xcframework, once PR for it is merged.
You'll just have to modify scons config a little to support your plugin. Right now it's limited by opts.Add(EnumVariable('plugin', 'Plugin to build', '', ['', 'arkit', 'camera', 'icloud', 'gamecenter', 'inappstore']))

@naithar very nice, i will try to check it out soon, i am doing other things today so maybe i won't be able to work on plugins today

@naithar very nice, i will try to check it out soon, i am doing other things today so maybe i won't be able to work on plugins today

@gustavottc

and errors are:
2021-01-17 18:22:48.542785+0200 AdMob[25364:2235955] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2830edc80'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x1034f41cc 0x1034f6794 0x104539528 0x10453ae6c 0x1034f51c4 0x103588bec 0x10358a648 0x10327b608 0x10327b560 0x1024ad324 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x10237ca50)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2830edc80'
terminating with uncaught exception of type NSException
(lldb)

or
'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x280c87140'
terminating with uncaught exception of type NSException
(lldb)

@gustavottc

and errors are:
2021-01-17 18:22:48.542785+0200 AdMob[25364:2235955] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2830edc80'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x1034f41cc 0x1034f6794 0x104539528 0x10453ae6c 0x1034f51c4 0x103588bec 0x10358a648 0x10327b608 0x10327b560 0x1024ad324 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x10237ca50)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x2830edc80'
terminating with uncaught exception of type NSException
(lldb)

or
'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x280c87140'
terminating with uncaught exception of type NSException
(lldb)

and these are the frameworks

and these are the frameworks

hmm, i never saw this error, i think it's not related to this plugin
try to export the game without the admob plugin to see if will work

hmm, i never saw this error, i think it's not related to this plugin
try to export the game without the admob plugin to see if will work

i think you already tried it and works, the Xcode show where the error are on the code?
like this:

i think you already tried it and works, the Xcode show where the error are on the code?
like this:

@gustavottc you should probably build the latest version of plugin for both debug and release build just in case. If your previous build was only in release mode you wouldn't really get any usable info from the crash log

@gustavottc you should probably build the latest version of plugin for both debug and release build just in case. If your previous build was only in release mode you wouldn't really get any usable info from the crash log

Export without the plugin works
Export with the plugin but with commented out admob_plugin_init and admob_plugin_deinit in dummy.cpp works

Export without the plugin works
Export with the plugin but with commented out admob_plugin_init and admob_plugin_deinit in dummy.cpp works

@naithar i already did it, but i don't know if will work to debug

I search here and this error "reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x280c87140'" is related to "NSDictionary" or something like that
but objectForKey return nil if a key doesn't exist.

@naithar i already did it, but i don't know if will work to debug

I search here and this error "reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x280c87140'" is related to "NSDictionary" or something like that
but objectForKey return nil if a key doesn't exist.

Captura de Tela 2021-01-17 às 13 58 02
Captura de Tela 2021-01-17 às 13 59 37
Just tried again on iPhone 8 13.0 and 14.3 and it's working fine, what version of your Xcode, Mac, Simulator SDK and iPhone?

Captura de Tela 2021-01-17 às 13 58 02
Captura de Tela 2021-01-17 às 13 59 37
Just tried again on iPhone 8 13.0 and 14.3 and it's working fine, what version of your Xcode, Mac, Simulator SDK and iPhone?

Xcode Version 12.3 (12C33)
Mac Pro 11.1 Late 2019
iPhone 5SE

Xcode Version 12.3 (12C33)
Mac Pro 11.1 Late 2019
iPhone 5SE

and these are the frameworks

You are missing these frameworks here: AppTrackingTransparency(optional), AdSupport(Optional), JavaScriptCore(Required)
but i think the error will continue appearing
after that, if the error continue to appear send to me the full log

and these are the frameworks

You are missing these frameworks here: AppTrackingTransparency(optional), AdSupport(Optional), JavaScriptCore(Required)
but i think the error will continue appearing
after that, if the error continue to appear send to me the full log

I created multiple different projects which had the Javascript framework but this one not.. sadly the error continues:
*********** main.m
running app main
2021-01-17 19:12:13.168524+0200 AdMob[25852:2250835] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/0E6C16C6-086E-499D-910D-453475102782/AdMob.app
godot_iphone /var/containers/Bundle/Application/0E6C16C6-086E-499D-910D-453475102782/AdMob.app/AdMob
cwd /private/var/containers/Bundle/Application/0E6C16C6-086E-499D-910D-453475102782/AdMob.app
os created
setting data dir to /var/mobile/Containers/Data/Application/16F57394-D10B-4838-8377-7620328B7095/Documents from /var/mobile/Containers/Data/Application/16F57394-D10B-4838-8377-7620328B7095/Documents
setup 0
2021-01-17 19:12:13.303730+0200 AdMob[25852:2250835] Metal GPU Frame Capture Enabled
2021-01-17 19:12:13.304094+0200 AdMob[25852:2250835] Metal API Validation Enabled
2021-01-17 19:12:13.395799+0200 AdMob[25852:2250835] Setting up an OpenGL ES 2.0 context.
2021-01-17 19:12:13.396891+0200 AdMob[25852:2250835] failed to make complete framebuffer object 8cd6
2021-01-17 19:12:13.396975+0200 AdMob[25852:2250835] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 19:12:13.445611+0200 AdMob[25852:2250835] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 19:12:13.445737+0200 AdMob[25852:2250835]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 19:12:13.682951+0200 AdMob[25852:2250835] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 19:12:13.692548+0200 AdMob[25852:2250835] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 19:12:13.708866+0200 AdMob[25852:2250835] OpenGL ES Batching: ON
2021-01-17 19:12:13.921768+0200 AdMob[25852:2250835]
2021-01-17 19:12:14.155348+0200 AdMob[25852:2251029]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~1458002511
2021-01-17 19:12:14.274074+0200 AdMob[25852:2251035]  - <Google>[I-ACS023007] Analytics v.70100000 started
2021-01-17 19:12:14.274549+0200 AdMob[25852:2251035]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 19:12:14.296080+0200 AdMob[25852:2250835] init admob plugin
2021-01-17 19:12:14.296190+0200 AdMob[25852:2250835] initialize admob
2021-01-17 19:12:14.303635+0200 AdMob[25852:2250835] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281e6d4c0
2021-01-17 19:12:14.339634+0200 AdMob[25852:2250835] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281e6d4c0'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x103b4c1cc 0x103b4e794 0x104585528 0x104586e6c 0x103b4d1c4 0x103be0bec 0x103be2648 0x1038d3608 0x1038d3560 0x102b05324 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x1029d4a50)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281e6d4c0'
terminating with uncaught exception of type NSException

I added the Javascript framework

This is where the error happens

I created multiple different projects which had the Javascript framework but this one not.. sadly the error continues:
*********** main.m
running app main
2021-01-17 19:12:13.168524+0200 AdMob[25852:2250835] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/0E6C16C6-086E-499D-910D-453475102782/AdMob.app
godot_iphone /var/containers/Bundle/Application/0E6C16C6-086E-499D-910D-453475102782/AdMob.app/AdMob
cwd /private/var/containers/Bundle/Application/0E6C16C6-086E-499D-910D-453475102782/AdMob.app
os created
setting data dir to /var/mobile/Containers/Data/Application/16F57394-D10B-4838-8377-7620328B7095/Documents from /var/mobile/Containers/Data/Application/16F57394-D10B-4838-8377-7620328B7095/Documents
setup 0
2021-01-17 19:12:13.303730+0200 AdMob[25852:2250835] Metal GPU Frame Capture Enabled
2021-01-17 19:12:13.304094+0200 AdMob[25852:2250835] Metal API Validation Enabled
2021-01-17 19:12:13.395799+0200 AdMob[25852:2250835] Setting up an OpenGL ES 2.0 context.
2021-01-17 19:12:13.396891+0200 AdMob[25852:2250835] failed to make complete framebuffer object 8cd6
2021-01-17 19:12:13.396975+0200 AdMob[25852:2250835] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 19:12:13.445611+0200 AdMob[25852:2250835] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 19:12:13.445737+0200 AdMob[25852:2250835]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 19:12:13.682951+0200 AdMob[25852:2250835] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 19:12:13.692548+0200 AdMob[25852:2250835] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 19:12:13.708866+0200 AdMob[25852:2250835] OpenGL ES Batching: ON
2021-01-17 19:12:13.921768+0200 AdMob[25852:2250835]
2021-01-17 19:12:14.155348+0200 AdMob[25852:2251029]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~1458002511
2021-01-17 19:12:14.274074+0200 AdMob[25852:2251035]  - <Google>[I-ACS023007] Analytics v.70100000 started
2021-01-17 19:12:14.274549+0200 AdMob[25852:2251035]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 19:12:14.296080+0200 AdMob[25852:2250835] init admob plugin
2021-01-17 19:12:14.296190+0200 AdMob[25852:2250835] initialize admob
2021-01-17 19:12:14.303635+0200 AdMob[25852:2250835] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281e6d4c0
2021-01-17 19:12:14.339634+0200 AdMob[25852:2250835] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281e6d4c0'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x103b4c1cc 0x103b4e794 0x104585528 0x104586e6c 0x103b4d1c4 0x103be0bec 0x103be2648 0x1038d3608 0x1038d3560 0x102b05324 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x1029d4a50)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281e6d4c0'
terminating with uncaught exception of type NSException

I added the Javascript framework

This is where the error happens

@naithar i already did it, but i don't know if will work to debug

I search here and this error "reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x280c87140'" is related to "NSDictionary" or something like that
but objectForKey return nil if a key doesn't exist.

You should probably upload the new version so @war1an could test it.
The crashing occurs due to the missing type check. Since Obj-C is dynamic in nature you can send any message to any object. That's what probably happens here.
If you upload your latest code changes we can probably check them and look for an issue.

@naithar i already did it, but i don't know if will work to debug

I search here and this error "reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x280c87140'" is related to "NSDictionary" or something like that
but objectForKey return nil if a key doesn't exist.

You should probably upload the new version so @war1an could test it.
The crashing occurs due to the missing type check. Since Obj-C is dynamic in nature you can send any message to any object. That's what probably happens here.
If you upload your latest code changes we can probably check them and look for an issue.

@war1an I guess this part has to do something with crashing.
https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/blob/fc688660ad16964e3507a6b99db80025d64096e3/ios/admob/src/AdMob.mm#L80-L87
Try calling initialize with false value for is_test_europe_user_consent parameter.
I can't find the class reference, but I guess testDeviceIdentifiers expects an NSArray, not a single NSString

@war1an I guess this part has to do something with crashing.
https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/blob/fc688660ad16964e3507a6b99db80025d64096e3/ios/admob/src/AdMob.mm#L80-L87
Try calling initialize with false value for is_test_europe_user_consent parameter.
I can't find the class reference, but I guess testDeviceIdentifiers expects an NSArray, not a single NSString

@war1an
still missing AppTrackingTransparency(optional), AdSupport(Optional), if don't appear you need to update your SDK to 14.0
and are you using this admob_plugin.zip from this comment: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761823025 ?
@naithar the testDeviceIdentifiers expects a NSString: https://developers.google.com/admob/ump/ios/quick-start#force_a_geography

soon i will send to GitHub, i still need to clean somethings on repository

@war1an
still missing AppTrackingTransparency(optional), AdSupport(Optional), if don't appear you need to update your SDK to 14.0
and are you using this admob_plugin.zip from this comment: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761823025 ?
@naithar the testDeviceIdentifiers expects a NSString: https://developers.google.com/admob/ump/ios/quick-start#force_a_geography

soon i will send to GitHub, i still need to clean somethings on repository

Sadly it continues to crash even with is_test_europe_user_consent set to false.
But this time the app open successfully and was able to confirm the consent form:

But after accepting and Allow the app to track me.. it crashed with different error:

*********** main.m
running app main
2021-01-17 19:42:42.290313+0200 AdMob[26166:2261170] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/0EC8D27D-4154-4970-B570-BC5AFF0FC708/AdMob.app
godot_iphone /var/containers/Bundle/Application/0EC8D27D-4154-4970-B570-BC5AFF0FC708/AdMob.app/AdMob
cwd /private/var/containers/Bundle/Application/0EC8D27D-4154-4970-B570-BC5AFF0FC708/AdMob.app
os created
setting data dir to /var/mobile/Containers/Data/Application/1EC3713C-67AE-4193-AFA8-98EBF7395AD7/Documents from /var/mobile/Containers/Data/Application/1EC3713C-67AE-4193-AFA8-98EBF7395AD7/Documents
setup 0
2021-01-17 19:42:42.403356+0200 AdMob[26166:2261170] Metal GPU Frame Capture Enabled
2021-01-17 19:42:42.403917+0200 AdMob[26166:2261170] Metal API Validation Enabled
2021-01-17 19:42:42.484331+0200 AdMob[26166:2261170] Setting up an OpenGL ES 2.0 context.
2021-01-17 19:42:42.484989+0200 AdMob[26166:2261170] failed to make complete framebuffer object 8cd6
2021-01-17 19:42:42.485055+0200 AdMob[26166:2261170] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 19:42:42.528728+0200 AdMob[26166:2261170] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 19:42:42.528810+0200 AdMob[26166:2261170]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 19:42:42.664710+0200 AdMob[26166:2261170] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 19:42:42.696915+0200 AdMob[26166:2261170] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 19:42:42.709869+0200 AdMob[26166:2261170] OpenGL ES Batching: ON
2021-01-17 19:42:42.712788+0200 AdMob[26166:2261422]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~1458002511
2021-01-17 19:42:42.773890+0200 AdMob[26166:2261410]  - <Google>[I-ACS023007] Analytics v.70100000 started
2021-01-17 19:42:42.774649+0200 AdMob[26166:2261410]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 19:42:42.826067+0200 AdMob[26166:2261170]
2021-01-17 19:42:42.874585+0200 AdMob[26166:2261410]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 19:42:42.885426+0200 AdMob[26166:2261410]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 19:42:43.169624+0200 AdMob[26166:2261170] init admob plugin
2021-01-17 19:42:43.169759+0200 AdMob[26166:2261170] initialize admob
2021-01-17 19:42:43.176747+0200 AdMob[26166:2261170] <UMP SDK> To enable debug mode for this device, set: UMPDebugSettings.testDeviceIdentifiers = @[ @"FB10FF91-2B1A-4213-8290-CADE116437CD" ];
2021-01-17 19:42:43.815585+0200 AdMob[26166:2261170] WF: === Starting WebFilter logging for process AdMob
2021-01-17 19:42:43.815638+0200 AdMob[26166:2261170] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2021-01-17 19:42:43.815679+0200 AdMob[26166:2261170] WF: _WebFilterIsActive returning: NO
2021-01-17 19:42:44.384412+0200 AdMob[26166:2261170] on Testing Real Device: testDeviceIdentifiers: 3976f80925b1fd76a09a7148d3d25f5c
2021-01-17 19:42:44.384696+0200 AdMob[26166:2261170] maxAdContentRating = GADMaxAdContentRatingGeneral
2021-01-17 19:42:44.404583+0200 AdMob[26166:2261170] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281bb7480
2021-01-17 19:42:44.424589+0200 AdMob[26166:2261170] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281bb7480'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x106240cb8 0x106240ab0 0x106247fa4 0x1062407d4 0x1062a9e74 0x107333ce4 0x107335528 0x107343994 0x1975f95e0 0x1975f3a88 0x1975f2ba0 0x104feb968 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x104fe6c3c)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281bb7480'
terminating with uncaught exception of type NSException

Sadly it continues to crash even with is_test_europe_user_consent set to false.
But this time the app open successfully and was able to confirm the consent form:

But after accepting and Allow the app to track me.. it crashed with different error:

*********** main.m
running app main
2021-01-17 19:42:42.290313+0200 AdMob[26166:2261170] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
Path: /var/containers/Bundle/Application/0EC8D27D-4154-4970-B570-BC5AFF0FC708/AdMob.app
godot_iphone /var/containers/Bundle/Application/0EC8D27D-4154-4970-B570-BC5AFF0FC708/AdMob.app/AdMob
cwd /private/var/containers/Bundle/Application/0EC8D27D-4154-4970-B570-BC5AFF0FC708/AdMob.app
os created
setting data dir to /var/mobile/Containers/Data/Application/1EC3713C-67AE-4193-AFA8-98EBF7395AD7/Documents from /var/mobile/Containers/Data/Application/1EC3713C-67AE-4193-AFA8-98EBF7395AD7/Documents
setup 0
2021-01-17 19:42:42.403356+0200 AdMob[26166:2261170] Metal GPU Frame Capture Enabled
2021-01-17 19:42:42.403917+0200 AdMob[26166:2261170] Metal API Validation Enabled
2021-01-17 19:42:42.484331+0200 AdMob[26166:2261170] Setting up an OpenGL ES 2.0 context.
2021-01-17 19:42:42.484989+0200 AdMob[26166:2261170] failed to make complete framebuffer object 8cd6
2021-01-17 19:42:42.485055+0200 AdMob[26166:2261170] Failed to create frame buffer!
******** setting up keyboard input view
******** adding observer for keyboard show/hide
start animation!
2021-01-17 19:42:42.528728+0200 AdMob[26166:2261170] **ERROR**: AudioOutputUnitStart failed, code: -50
2021-01-17 19:42:42.528810+0200 AdMob[26166:2261170]    At: drivers/coreaudio/audio_driver_coreaudio.cpp:256:start() - AudioOutputUnitStart failed, code: -50
2021-01-17 19:42:42.664710+0200 AdMob[26166:2261170] Godot Engine v3.2.4.beta6.official - https://godotengine.org
2021-01-17 19:42:42.696915+0200 AdMob[26166:2261170] OpenGL ES 2.0 Renderer: Apple A9 GPU
2021-01-17 19:42:42.709869+0200 AdMob[26166:2261170] OpenGL ES Batching: ON
2021-01-17 19:42:42.712788+0200 AdMob[26166:2261422]  - <Google>[I-ACS025031] AdMob App ID changed. Original, new: (nil), ca-app-pub-3940256099942544~1458002511
2021-01-17 19:42:42.773890+0200 AdMob[26166:2261410]  - <Google>[I-ACS023007] Analytics v.70100000 started
2021-01-17 19:42:42.774649+0200 AdMob[26166:2261410]  - <Google>[I-ACS023008] To enable debug logging set the following application argument: -APMAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2021-01-17 19:42:42.826067+0200 AdMob[26166:2261170]
2021-01-17 19:42:42.874585+0200 AdMob[26166:2261410]  - <Google>[I-ACS800023] No pending snapshot to activate. SDK name: app_measurement
2021-01-17 19:42:42.885426+0200 AdMob[26166:2261410]  - <Google>[I-ACS023012] Analytics collection enabled
2021-01-17 19:42:43.169624+0200 AdMob[26166:2261170] init admob plugin
2021-01-17 19:42:43.169759+0200 AdMob[26166:2261170] initialize admob
2021-01-17 19:42:43.176747+0200 AdMob[26166:2261170] <UMP SDK> To enable debug mode for this device, set: UMPDebugSettings.testDeviceIdentifiers = @[ @"FB10FF91-2B1A-4213-8290-CADE116437CD" ];
2021-01-17 19:42:43.815585+0200 AdMob[26166:2261170] WF: === Starting WebFilter logging for process AdMob
2021-01-17 19:42:43.815638+0200 AdMob[26166:2261170] WF: _userSettingsForUser mobile: {
    filterBlacklist =     (
    );
    filterWhitelist =     (
    );
    restrictWeb = 1;
    useContentFilter = 0;
    useContentFilterOverrides = 0;
    whitelistEnabled = 0;
}
2021-01-17 19:42:43.815679+0200 AdMob[26166:2261170] WF: _WebFilterIsActive returning: NO
2021-01-17 19:42:44.384412+0200 AdMob[26166:2261170] on Testing Real Device: testDeviceIdentifiers: 3976f80925b1fd76a09a7148d3d25f5c
2021-01-17 19:42:44.384696+0200 AdMob[26166:2261170] maxAdContentRating = GADMaxAdContentRatingGeneral
2021-01-17 19:42:44.404583+0200 AdMob[26166:2261170] -[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281bb7480
2021-01-17 19:42:44.424589+0200 AdMob[26166:2261170] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281bb7480'
*** First throw call stack:
(0x1976799d8 0x1ab9e2b54 0x197589bbc 0x19767c01c 0x19767df8c 0x106240cb8 0x106240ab0 0x106247fa4 0x1062407d4 0x1062a9e74 0x107333ce4 0x107335528 0x107343994 0x1975f95e0 0x1975f3a88 0x1975f2ba0 0x104feb968 0x19a7af8e4 0x1a1de05a8 0x1975d6b54 0x1975fa420 0x1975f9834 0x1975f39f4 0x1975f2ba0 0x1ae330598 0x199ee23d8 0x199ee7958 0x104fe6c3c)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsObject:]: unrecognized selector sent to instance 0x281bb7480'
terminating with uncaught exception of type NSException

So probably the error is over here, hmm...

So probably the error is over here, hmm...

@gustavottc Yes, I'm using the latest plugin version. I also added AppTrackingTransparency, AdSupport... the same error though

@gustavottc Yes, I'm using the latest plugin version. I also added AppTrackingTransparency, AdSupport... the same error though

@naithar https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/tree/iOS-Plugin/ios/admob_plugin

@naithar https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/tree/iOS-Plugin/ios/admob_plugin

@war1an change the '.a' file by this one:
libadmob_plugin.a.zip
This '.a' file is here:

will again give error, but i need to see the logs

@war1an change the '.a' file by this one:
libadmob_plugin.a.zip
This '.a' file is here:

will again give error, but i need to see the logs

@naithar the testDeviceIdentifiers expects a NSString: https://developers.google.com/admob/ump/ios/quick-start#force_a_geography

It expects an array of strings:

UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];
debugSettings.testDeviceIdentifiers = @[ @"TEST-DEVICE-HASHED-ID" ];
debugSettings.geography = UMPDebugGeographyEEA;

@naithar the testDeviceIdentifiers expects a NSString: https://developers.google.com/admob/ump/ios/quick-start#force_a_geography

It expects an array of strings:

UMPDebugSettings *debugSettings = [[UMPDebugSettings alloc] init];
debugSettings.testDeviceIdentifiers = @[ @"TEST-DEVICE-HASHED-ID" ];
debugSettings.geography = UMPDebugGeographyEEA;

https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/blob/iOS-Plugin/ios/admob_plugin/admob_plugin_implementation.mm#L139 same issue - NSAtring instead of NSArray containing NSStrings

https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/blob/iOS-Plugin/ios/admob_plugin/admob_plugin_implementation.mm#L139 same issue - NSAtring instead of NSArray containing NSStrings

How can I fix this? Just adding a @ on front of  [ ]? (ObjC confuses me a lot :( )

How can I fix this? Just adding a @ on front of  [ ]? (ObjC confuses me a lot :( )

I would also suggest checking plugin on leaks with Instruments app and static checker in Xcode. Since AdMob seems to be heavily using blocks this could cause a reference cycle if not properly handled. _weakify, _strogify macroses should help you with it: https://github.com/godotengine/godot/blob/3.2/platform/iphone/platform_config.h and example: https://github.com/naithar/godot_plugins_ios/blob/master/gamecenter/game_center.mm#L84-L88

I would also suggest checking plugin on leaks with Instruments app and static checker in Xcode. Since AdMob seems to be heavily using blocks this could cause a reference cycle if not properly handled. _weakify, _strogify macroses should help you with it: https://github.com/godotengine/godot/blob/3.2/platform/iphone/platform_config.h and example: https://github.com/naithar/godot_plugins_ios/blob/master/gamecenter/game_center.mm#L84-L88

How can I fix this? Just adding a @ on front of  [ ]? (ObjC confuses me a lot :/ )

Add @[ at the start and ] at the end. It should look somehow like this:  = @[ [NSString ...] ];

How can I fix this? Just adding a @ on front of  [ ]? (ObjC confuses me a lot :/ )

Add @[ at the start and ] at the end. It should look somehow like this:  = @[ [NSString ...] ];

libadmob_plugin.a.zip
@war1an please try with this '.a' file, just update now

libadmob_plugin.a.zip
@war1an please try with this '.a' file, just update now

@gustavottc
I replace the file which is located at ... {exported_project}/Admob/ios/plugins/libadmob_plugin.a. That should be the place because in the {project}/iOS/plugins/{we_have_release_and_debug.a files}
After that the build fails:
ld: warning: Could not find or use auto-linked framework 'FBLPromises'

The test is done with newly exported project

@gustavottc
I replace the file which is located at ... {exported_project}/Admob/ios/plugins/libadmob_plugin.a. That should be the place because in the {project}/iOS/plugins/{we_have_release_and_debug.a files}
After that the build fails:
ld: warning: Could not find or use auto-linked framework 'FBLPromises'

The test is done with newly exported project

@gustavottc Also If I try to run the project on the device I get.. Building for iOS, but the linked library 'libadmob_plugin.a' was built for iOS Simulator.

@gustavottc Also If I try to run the project on the device I get.. Building for iOS, but the linked library 'libadmob_plugin.a' was built for iOS Simulator.

@gustavottc  I did everything from scratch to make sure that I'm doing something wrong.
I'm using for sure the latest plugin version.
Old .a file:
With is_test_europe_user_consent set to true - the app crashes
With linked project using this method.. https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_ios.html it seems that it doesn't detect the changes made on is_test_europe_user_consent. @naithar I have two version of Godot (3.2.3.stable and beta 6), but the app starts, the plugin is loaded and then it crashes.. so I think the problem doesn't come from using the 3.2.3.stable.
I see the consent pop up and the alert afterwards.. but after the app crashes the same way as yesterday
New .a file:
With the new .a file running the app on a device - Building for iOS, but the linked library 'libadmob_plugin.a' was built for iOS Simulator.
With the new .a file running on simulator - ld: warning: Could not find or use auto-linked framework 'FBLPromises'

@gustavottc  I did everything from scratch to make sure that I'm doing something wrong.
I'm using for sure the latest plugin version.
Old .a file:
With is_test_europe_user_consent set to true - the app crashes
With linked project using this method.. https://docs.godotengine.org/en/stable/getting_started/workflow/export/exporting_for_ios.html it seems that it doesn't detect the changes made on is_test_europe_user_consent. @naithar I have two version of Godot (3.2.3.stable and beta 6), but the app starts, the plugin is loaded and then it crashes.. so I think the problem doesn't come from using the 3.2.3.stable.
I see the consent pop up and the alert afterwards.. but after the app crashes the same way as yesterday
New .a file:
With the new .a file running the app on a device - Building for iOS, but the linked library 'libadmob_plugin.a' was built for iOS Simulator.
With the new .a file running on simulator - ld: warning: Could not find or use auto-linked framework 'FBLPromises'

@naithar I have two version of Godot (3.2.3.stable and beta 6), but the app starts, the plugin is loaded and then it crashes.. so I think the problem doesn't come from using the 3.2.3.stable. Probably the libadmob_plugin.a needs to be rebuild when Building inside Xcode.

The problem seems to be in admob plugin code, as we discussed with @gustavottc here. It should be fixed now, but @gustavottc gave you .a for simulator, so you can't really test it on device. Unless you can build one yourself.

@naithar I have two version of Godot (3.2.3.stable and beta 6), but the app starts, the plugin is loaded and then it crashes.. so I think the problem doesn't come from using the 3.2.3.stable. Probably the libadmob_plugin.a needs to be rebuild when Building inside Xcode.

The problem seems to be in admob plugin code, as we discussed with @gustavottc here. It should be fixed now, but @gustavottc gave you .a for simulator, so you can't really test it on device. Unless you can build one yourself.

Sadly the new .a file doesn't work on simulator though. The error is ld: warning: Could not find or use auto-linked framework 'FBLPromises. The old does work but is_test_europe_user_consent needs to be set to true.
But isn't this file generated on export from Godot? So if understand correctly every time someone changes .gd files, .tscn files.. the file needs to be generated again? But it's seem that when I change is_test_europe_user_consent to false.. the change is not registered.

Sadly the new .a file doesn't work on simulator though. The error is ld: warning: Could not find or use auto-linked framework 'FBLPromises. The old does work but is_test_europe_user_consent needs to be set to true.
But isn't this file generated on export from Godot? So if understand correctly every time someone changes .gd files, .tscn files.. the file needs to be generated again? But it's seem that when I change is_test_europe_user_consent to false.. the change is not registered.

Sadly the new .a file doesn't work on simulator though. The error is ld: warning: Could not find or use auto-linked framework 'FBLPromises. The old does work but is_test_europe_user_consent needs to be set to true.

Maybe you need some additional dependency, maybe @gustavottc knows.

But isn't this file generated on export from Godot? So if understand correctly every time someone changes .gd files, .tscn files.. the file needs to be generated again? But it's seem that when I change is_test_europe_user_consent to false.. the change is not registered.

Which file is generated? .a is static library and should be compiled/generated before and doesn't need to be regenerated on script change.
Changing is_test_europe_user_consent to false fixes only one occurrence of incorrect code usage. There are currently two places that a single value is used instead of an array. https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761848829 and https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761858249. And is_test_europe_user_consent is responsible only for the first one, but the second one crashes only on real device, as there are a simulator/device check.

Sadly the new .a file doesn't work on simulator though. The error is ld: warning: Could not find or use auto-linked framework 'FBLPromises. The old does work but is_test_europe_user_consent needs to be set to true.

Maybe you need some additional dependency, maybe @gustavottc knows.

But isn't this file generated on export from Godot? So if understand correctly every time someone changes .gd files, .tscn files.. the file needs to be generated again? But it's seem that when I change is_test_europe_user_consent to false.. the change is not registered.

Which file is generated? .a is static library and should be compiled/generated before and doesn't need to be regenerated on script change.
Changing is_test_europe_user_consent to false fixes only one occurrence of incorrect code usage. There are currently two places that a single value is used instead of an array. https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761848829 and https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761858249. And is_test_europe_user_consent is responsible only for the first one, but the second one crashes only on real device, as there are a simulator/device check.

You can ignore the error ld: warning: Could not find or use auto-linked framework 'FBLPromises, but this error generally is because you missing some framework, try to put AppTrackingTransparency and AdSupport to "Optional"
I will generate another '.a' file with all platforms soon, i think i fixed this

You can ignore the error ld: warning: Could not find or use auto-linked framework 'FBLPromises, but this error generally is because you missing some framework, try to put AppTrackingTransparency and AdSupport to "Optional"
I will generate another '.a' file with all platforms soon, i think i fixed this

@war1an please test with this one, if possible send me the logs (this '.a' is only debug version for x86_64, arm64, armv7)
libadmob_plugin.a.zip

@war1an please test with this one, if possible send me the logs (this '.a' is only debug version for x86_64, arm64, armv7)
libadmob_plugin.a.zip

@war1an when you make a update on your game (like GDScript, .tscn file) you don't need to export the whole project again, just the '.pck' file, but if you want to include more plugins or change the version you need to export the whole project because will overwrite the '.xcodeproj' with these new informations
but when you need to update a existing '.a' file exported, you don't need to export the game (even '.pck'), what you need to do is replace the '.a' file that are placed inside your Xcode project, like this:

@war1an when you make a update on your game (like GDScript, .tscn file) you don't need to export the whole project again, just the '.pck' file, but if you want to include more plugins or change the version you need to export the whole project because will overwrite the '.xcodeproj' with these new informations
but when you need to update a existing '.a' file exported, you don't need to export the game (even '.pck'), what you need to do is replace the '.a' file that are placed inside your Xcode project, like this:

Yes, I changed the file the same way. The result is the following:

as I mentioned the old .a file works perfectly on simulator but the new .a keeps showing Could not find or use auto-linked framework 'FBLPromises' for both Device and Simulator. Even though PromisesObjC.xcframework is there!
I exported the project whereExport with Debug set to off, should I change it?

Yes, I changed the file the same way. The result is the following:

as I mentioned the old .a file works perfectly on simulator but the new .a keeps showing Could not find or use auto-linked framework 'FBLPromises' for both Device and Simulator. Even though PromisesObjC.xcframework is there!
I exported the project whereExport with Debug set to off, should I change it?

Yes, i think is better you export again, actually the error is not 'FBLPromises' and something with ClassDB
Are you exporting with 3.2.4beta6?
Please export like this: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761823025

Yes, i think is better you export again, actually the error is not 'FBLPromises' and something with ClassDB
Are you exporting with 3.2.4beta6?
Please export like this: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/issues/27#issuecomment-761823025

For me is still working great and showing the changes that i did, i really don't know for sure why this happen to you and not for me
Even the FBLPromises doesn't appear for me

For me is still working great and showing the changes that i did, i really don't know for sure why this happen to you and not for me
Even the FBLPromises doesn't appear for me

This was the first test where Export with Debug was set to on and it works on both device and simulator. If I export with Export with Debug set to off i see the same errors:
Could not find or use auto-linked framework 'FBLPromises'
Undefined symbol: MethodBind::_generate_argument_types(int)
Undefined symbol: ClassDB::bind_methodfi(unsigned int, MethodBind*, MethodDefinition const&, Variant const**, int)

This was the first test where Export with Debug was set to on and it works on both device and simulator. If I export with Export with Debug set to off i see the same errors:
Could not find or use auto-linked framework 'FBLPromises'
Undefined symbol: MethodBind::_generate_argument_types(int)
Undefined symbol: ClassDB::bind_methodfi(unsigned int, MethodBind*, MethodDefinition const&, Variant const**, int)

Yes, I changed the file the same way. The result is the following:

That's because plugin .a and template .a is built with different configurations. You can't mix debug, release_debug and release configurations together. Well, release_debug should work with release, but I wouldn't suggest mixing it anyway.

Yes, I changed the file the same way. The result is the following:

That's because plugin .a and template .a is built with different configurations. You can't mix debug, release_debug and release configurations together. Well, release_debug should work with release, but I wouldn't suggest mixing it anyway.

@war1an so it's working with debug? nice! it won't work with release version because i just build for debug
i will create now a plugin with release and debug for you

@war1an so it's working with debug? nice! it won't work with release version because i just build for debug
i will create now a plugin with release and debug for you

admob_plugin.zip
@war1an please test it out
@naithar please check if configuration is correct for release_debug

admob_plugin.zip
@war1an please test it out
@naithar please check if configuration is correct for release_debug

@naithar please check if configuration is correct for release_debug

I wasn't referring to .gdip file.
By .a configuration I meant compilation flags, which should be the same as the ones used for Godot's template compilation. Godot's official templates use release and release_debug configurations, and compilation flags should be the same for plugins to work correctly if at all. debug configuration wouldn't work with official templates.
I haven't finished testing, but you can use https://github.com/naithar/godot-ios-plugins repo now to compile your plugin. Just make use you are using 3.2 branch for godot submodule. To compile plugins that could work with official Godot templates ou will need to compile release and release_debug targets.

@naithar please check if configuration is correct for release_debug

I wasn't referring to .gdip file.
By .a configuration I meant compilation flags, which should be the same as the ones used for Godot's template compilation. Godot's official templates use release and release_debug configurations, and compilation flags should be the same for plugins to work correctly if at all. debug configuration wouldn't work with official templates.
I haven't finished testing, but you can use https://github.com/naithar/godot-ios-plugins repo now to compile your plugin. Just make use you are using 3.2 branch for godot submodule. To compile plugins that could work with official Godot templates ou will need to compile release and release_debug targets.

@gustavottc it's seem that it works! But the consentdialog keeps showing up on app start even though I consented already

@gustavottc it's seem that it works! But the consentdialog keeps showing up on app start even though I consented already

@naithar hmmm, i will try it tomorrow, i need to do somethings here
@war1an yes, because of this: https://developers.google.com/admob/ump/ios/quick-start#reset_consent_state
In testing your app with the UMP SDK, you may find it helpful to reset the state of the SDK so that you can simulate a user's first install experience. The SDK provides the reset method to do this.
so i set it when you are testing the UMP, when you won't test the UMP, you just need to disable is_test_europe_user_consent (don't worry, if the UMP appear on test, it will work on users on Europe when your app is released)

@naithar hmmm, i will try it tomorrow, i need to do somethings here
@war1an yes, because of this: https://developers.google.com/admob/ump/ios/quick-start#reset_consent_state
In testing your app with the UMP SDK, you may find it helpful to reset the state of the SDK so that you can simulate a user's first install experience. The SDK provides the reset method to do this.
so i set it when you are testing the UMP, when you won't test the UMP, you just need to disable is_test_europe_user_consent (don't worry, if the UMP appear on test, it will work on users on Europe when your app is released)

and the UMP is not mandatory, you can release your app for Europe without it, but maybe they will require you for enable this specially if your app become popular,

so if they ask, you can easily activate it by configuring your App's Funding Choices: https://support.google.com/fundingchoices/answer/9180084
if you do not, UMP will not appear for your App, it is currently appearing for test because the test ID is configured to appear by Funding Choices

and the UMP is not mandatory, you can release your app for Europe without it, but maybe they will require you for enable this specially if your app become popular,

so if they ask, you can easily activate it by configuring your App's Funding Choices: https://support.google.com/fundingchoices/answer/9180084
if you do not, UMP will not appear for your App, it is currently appearing for test because the test ID is configured to appear by Funding Choices

Awesome!
 But can the plugin automate some of it? @naithar mentioned that its possible to list the default frameworks. Since JavaScriptCore is required it should be an issue to be there.

Awesome!
 But can the plugin automate some of it? @naithar mentioned that its possible to list the default frameworks. Since JavaScriptCore is required it should be an issue to be there.

Since 3.2.3 Godot uses ObjC modules so it might not be necessary to include any System frameworks. Non system framework can be placed next to the .a files and added to the linked (I would guess that's the option needed) or embedded section depending on the needs.

Since 3.2.3 Godot uses ObjC modules so it might not be necessary to include any System frameworks. Non system framework can be placed next to the .a files and added to the linked (I would guess that's the option needed) or embedded section depending on the needs.

@war1an probably i will try it tomorrow, i'm very busy these days :(

@war1an probably i will try it tomorrow, i'm very busy these days :(

@gustavottc  No worries, thanks again for the work!
I decided to try create a plugin for https://github.com/Shin-NiL/Godot-Share/tree/master/share/ios/src there are not frameworks and code seems pretty simple.
But when I follow the instructions here https://github.com/godotengine/godot-ios-plugins I'm left a bit lost..
First I didn't know what Use submodule to pull required Godot version mean.. but then after a google search this appears to be a git command so I ran git submodule add -b 3.2 which didn't do anything, after that git submodule update --init --recursive.
But since 3.2.4-6beta doesn't have a branch.. I thought for now I should download it from https://downloads.tuxfamily.org/godotengine/3.2.4/beta6/
extract_headers.sh - this doesn't do anything, it creates an empty folder extracted_headers
If I use the other project which has an Xcode project I get Both of these methods give me 'method_bind.gen.inc' file not found inside method_bind.h when I try to build. Obviously I'm doing something wrong...
Care to share the workflow and the steps how to create a plugin.. after you feel you understand the process?
@naithar I also tried follow the documentation here https://github.com/godotengine/godot-docs/pull/4213/commits/70fdb68fa35b6e9ce390a10101aef2c6292caaf6 but using this template https://github.com/naithar/godot_ios_plugin_apns I can't do anything because of 'method_bind.gen.inc' file not found inside method_bind.h. Can at some point the tutorial be more beginners friendly?
For example in the Read.me file there is not mention of generate_static_library.sh which basically has scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.2|4.0> In a convenient way.
Which should be called like this sh generate_static_library.sh sharePlugin <simulator|iphone> 3.2 - but for beta builds do we call it differently?

@gustavottc  No worries, thanks again for the work!
I decided to try create a plugin for https://github.com/Shin-NiL/Godot-Share/tree/master/share/ios/src there are not frameworks and code seems pretty simple.
But when I follow the instructions here https://github.com/godotengine/godot-ios-plugins I'm left a bit lost..
First I didn't know what Use submodule to pull required Godot version mean.. but then after a google search this appears to be a git command so I ran git submodule add -b 3.2 which didn't do anything, after that git submodule update --init --recursive.
But since 3.2.4-6beta doesn't have a branch.. I thought for now I should download it from https://downloads.tuxfamily.org/godotengine/3.2.4/beta6/
extract_headers.sh - this doesn't do anything, it creates an empty folder extracted_headers
If I use the other project which has an Xcode project I get Both of these methods give me 'method_bind.gen.inc' file not found inside method_bind.h when I try to build. Obviously I'm doing something wrong...
Care to share the workflow and the steps how to create a plugin.. after you feel you understand the process?
@naithar I also tried follow the documentation here https://github.com/godotengine/godot-docs/pull/4213/commits/70fdb68fa35b6e9ce390a10101aef2c6292caaf6 but using this template https://github.com/naithar/godot_ios_plugin_apns I can't do anything because of 'method_bind.gen.inc' file not found inside method_bind.h. Can at some point the tutorial be more beginners friendly?
For example in the Read.me file there is not mention of generate_static_library.sh which basically has scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.2|4.0> In a convenient way.
Which should be called like this sh generate_static_library.sh sharePlugin <simulator|iphone> 3.2 - but for beta builds do we call it differently?

@war1an if we take https://github.com/naithar/godot_ios_plugin_apns as an example you should do the following:

Run git clone --recurse-submodules https://github.com/naithar/godot_ios_plugin_apns to clone a repo with it's submodules.
If you have repo cloned already git submodule update --recursive should clone the submodule into godot folder.
Submodule should already be pointing to the Godot's 3.2 branch which was used for releasing 3.2.4 beta 6.
If it's not cding into the folder and running git fetch --all && git checkout origin/3.2 or something along this lines should do the trick.

Then go to the godot folder and perform initial build for Godot Engine via
cd godot
scons platform=iphone target=debug

You don't have to wait for full engine compilation as header files are generated first, so once an actual compilation starts you can stop this command.

After this you can run scons platform=iphone arch=<arch> simulator=<yes|no> target=<release|debug|release_debug> as stated in README file to generate .a binary file.

In other words you need:

Godot's source header files including generated ones (example repos use full Godot's source for this). I think it might be a good idea to include extracted headers in release tags in future just in case.
Correct scons configuration to generate .a library (which can be taken from https://github.com/naithar/godot_ios_plugin_apns as it's basically repo independent). Each scons run will build one library for each configuration (combination of arch, compilation flags and device/simulator) you specify, so to get fat library which will contain everything, you will need to run it multiple times and then lipo them together. But remember not to mix up different compilation configurations together.
Correct .gdip configuration

For example in the Read.me file there is not mention of generate_static_library.sh which basically has scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.2|4.0> In a convenient way.

I think I must have just miss typed generate_static_library.sh in Building a .a library section, so it should be ./scripts/generate_static_library.sh <plugin_name> <debug|release|release_debug> <godot_version>, not  ./scripts/generate_xcframework.sh <plugin_name> <debug|release|release_debug> <godot_version> for static library generation.

Which should be called like this sh generate_static_library.sh sharePlugin <simulator|iphone> 3.2 - but for beta builds do we call it differently?

Both generate_xcframework.sh and generate_static_library.sh in https://github.com/godotengine/godot-ios-plugins repo generate simulator and device libraries themselves. You should specify <plugin_name> which is limited by specific plugin names for https://github.com/godotengine/godot-ios-plugins, compilation configuration via <debug|release|release_debug> and <godot_version> value, so scons can get correct compilation flags.
But both scripts should be changed in case you would want to use them to build other plugins like https://github.com/naithar/godot_ios_plugin_apns

@war1an if we take https://github.com/naithar/godot_ios_plugin_apns as an example you should do the following:

Run git clone --recurse-submodules https://github.com/naithar/godot_ios_plugin_apns to clone a repo with it's submodules.
If you have repo cloned already git submodule update --recursive should clone the submodule into godot folder.
Submodule should already be pointing to the Godot's 3.2 branch which was used for releasing 3.2.4 beta 6.
If it's not cding into the folder and running git fetch --all && git checkout origin/3.2 or something along this lines should do the trick.

Then go to the godot folder and perform initial build for Godot Engine via
cd godot
scons platform=iphone target=debug

You don't have to wait for full engine compilation as header files are generated first, so once an actual compilation starts you can stop this command.

After this you can run scons platform=iphone arch=<arch> simulator=<yes|no> target=<release|debug|release_debug> as stated in README file to generate .a binary file.

In other words you need:

Godot's source header files including generated ones (example repos use full Godot's source for this). I think it might be a good idea to include extracted headers in release tags in future just in case.
Correct scons configuration to generate .a library (which can be taken from https://github.com/naithar/godot_ios_plugin_apns as it's basically repo independent). Each scons run will build one library for each configuration (combination of arch, compilation flags and device/simulator) you specify, so to get fat library which will contain everything, you will need to run it multiple times and then lipo them together. But remember not to mix up different compilation configurations together.
Correct .gdip configuration

For example in the Read.me file there is not mention of generate_static_library.sh which basically has scons target=<debug|release|release_debug> arch=<arch> simulator=<no|yes> plugin=<plugin_name> version=<3.2|4.0> In a convenient way.

I think I must have just miss typed generate_static_library.sh in Building a .a library section, so it should be ./scripts/generate_static_library.sh <plugin_name> <debug|release|release_debug> <godot_version>, not  ./scripts/generate_xcframework.sh <plugin_name> <debug|release|release_debug> <godot_version> for static library generation.

Which should be called like this sh generate_static_library.sh sharePlugin <simulator|iphone> 3.2 - but for beta builds do we call it differently?

Both generate_xcframework.sh and generate_static_library.sh in https://github.com/godotengine/godot-ios-plugins repo generate simulator and device libraries themselves. You should specify <plugin_name> which is limited by specific plugin names for https://github.com/godotengine/godot-ios-plugins, compilation configuration via <debug|release|release_debug> and <godot_version> value, so scons can get correct compilation flags.
But both scripts should be changed in case you would want to use them to build other plugins like https://github.com/naithar/godot_ios_plugin_apns

I'm not sure what you expect to get from the link, since it contains releases, not source files

It does contain source files, for example: godot-3.2.4-beta6.tar.xz.
I did ended up following these steps which resolved most of the issues:

Run git clone --recurse-submodules https://github.com/naithar/godot_ios_plugin_apns to clone a repo with it's submodules.
If you have repo cloned already git submodule update --recursive should clone the submodule into godot folder.
Submodule should already be pointing to the Godot's 3.2 branch which was used for releasing 3.2.4 beta 6.
If it's not cding into the folder and running git fetch --all && git checkout origin/3.2 or something along this lines should do the trick.
Then go to the godot folder and perform initial build for Godot Engine viacd godot
scons platform=iphone target=debug

I had problems with generating the static library using: generate_static_library.sh as an example.
scons target=release_debug arch=arm64 plugin=share_plugin version=3.2 zsh: command not found: # scons: Reading SConscript files ... No valid target name.
So I changed plugin to target_name.  Later I notices that https://github.com/godotengine/godot-ios-plugins has different SConscript configuration.. which explains a lot.
But that still didn't  worked.. and then I noticed inside SConscript the following # tweak this if you want to use different folders, or more folders, to store your source code in.
After I changed godot_plugin to share_plugin everything worked.
Here is the response from an exported project
2021-01-21 17:38:17.861081+0200 SharePluginMy[6144:271527] init plugin
2021-01-21 17:38:17.861234+0200 SharePluginMy[6144:271527] initialize share
2021-01-21 17:38:23.331272+0200 SharePluginMy[6144:271527] inside shareText

My first plugin 🥳
Overall the process is not that complicated... it just a little bit confusing as a beginner.  For example godotengine/godot-ios-plugins repo doesn't have an Xcode project? Is this method for simple plugins without frameworks? When it should be used? What are the benefits of using this method or an Xcode project?
@naithar Thank you very much for hard work!

I'm not sure what you expect to get from the link, since it contains releases, not source files

It does contain source files, for example: godot-3.2.4-beta6.tar.xz.
I did ended up following these steps which resolved most of the issues:

Run git clone --recurse-submodules https://github.com/naithar/godot_ios_plugin_apns to clone a repo with it's submodules.
If you have repo cloned already git submodule update --recursive should clone the submodule into godot folder.
Submodule should already be pointing to the Godot's 3.2 branch which was used for releasing 3.2.4 beta 6.
If it's not cding into the folder and running git fetch --all && git checkout origin/3.2 or something along this lines should do the trick.
Then go to the godot folder and perform initial build for Godot Engine viacd godot
scons platform=iphone target=debug

I had problems with generating the static library using: generate_static_library.sh as an example.
scons target=release_debug arch=arm64 plugin=share_plugin version=3.2 zsh: command not found: # scons: Reading SConscript files ... No valid target name.
So I changed plugin to target_name.  Later I notices that https://github.com/godotengine/godot-ios-plugins has different SConscript configuration.. which explains a lot.
But that still didn't  worked.. and then I noticed inside SConscript the following # tweak this if you want to use different folders, or more folders, to store your source code in.
After I changed godot_plugin to share_plugin everything worked.
Here is the response from an exported project
2021-01-21 17:38:17.861081+0200 SharePluginMy[6144:271527] init plugin
2021-01-21 17:38:17.861234+0200 SharePluginMy[6144:271527] initialize share
2021-01-21 17:38:23.331272+0200 SharePluginMy[6144:271527] inside shareText

My first plugin 🥳
Overall the process is not that complicated... it just a little bit confusing as a beginner.  For example godotengine/godot-ios-plugins repo doesn't have an Xcode project? Is this method for simple plugins without frameworks? When it should be used? What are the benefits of using this method or an Xcode project?
@naithar Thank you very much for hard work!

Overall the process is not that complicated... it just a little bit confusing as a beginner. For example godotengine/godot-ios-plugins repo doesn't have an Xcode project? Is this method for simple plugins without frameworks? When it should be used? What are the benefits of using this method or an Xcode project?

Godot uses -fmodules and -fcxxmodules which allows to skip manual linking of system frameworks, like UserNotification, Foundation and some other in case of APNS. In case you need third party frameworks you can use LIBPATH, LIBS and LINKFLAGS environment variables to specify them.
godotengine/godot-ios-plugins  doesn't have Xcode project because supporting and keeping it up to date is not worth it, especially since that repo supports both 3.2 and 4.0 Godot version and multiple plugins at once. But Xcode project might be a good solution for simple single-plugin repo in case someone would care about keeping it up to date with all compilation flags that Godot would require.

Overall the process is not that complicated... it just a little bit confusing as a beginner. For example godotengine/godot-ios-plugins repo doesn't have an Xcode project? Is this method for simple plugins without frameworks? When it should be used? What are the benefits of using this method or an Xcode project?

Godot uses -fmodules and -fcxxmodules which allows to skip manual linking of system frameworks, like UserNotification, Foundation and some other in case of APNS. In case you need third party frameworks you can use LIBPATH, LIBS and LINKFLAGS environment variables to specify them.
godotengine/godot-ios-plugins  doesn't have Xcode project because supporting and keeping it up to date is not worth it, especially since that repo supports both 3.2 and 4.0 Godot version and multiple plugins at once. But Xcode project might be a good solution for simple single-plugin repo in case someone would care about keeping it up to date with all compilation flags that Godot would require.

For generating the headers for release build is it enough to run:

cd godot
scons platform=iphone target=debug

And does it matter if the target is debug or release?

For generating the headers for release build is it enough to run:

cd godot
scons platform=iphone target=debug

And does it matter if the target is debug or release?

@war1an congrats!!! Amazing work

@war1an congrats!!! Amazing work

And does it matter if the target is debug or release?

I don't think so at least it didn't matter when I was testing it.
But it might be a good idea to run scons platform=iphone target=<target> with the same target value as plugin compilation just in case.
And as I said earlier, you probably wouldn't need to use debug target - release_debug is the one you should be after.

And does it matter if the target is debug or release?

I don't think so at least it didn't matter when I was testing it.
But it might be a good idea to run scons platform=iphone target=<target> with the same target value as plugin compilation just in case.
And as I said earlier, you probably wouldn't need to use debug target - release_debug is the one you should be after.

Hey @naithar i saw you add the flag "simulator" on SConstruct, but why need this? I thought x86_64 was already "simulator"

Hey @naithar i saw you add the flag "simulator" on SConstruct, but why need this? I thought x86_64 was already "simulator"

@naithar i just did as the tutorial here: https://github.com/godotengine/godot-ios-plugins and it's working everything really great, but i have some doubts:

How can i use the .xcframework with .gdip?
The parameter plugin=<plugin_name>  is such as the target_name?
If i build just for release_debug i still need to build for release or debug?
Is still needed to put simulator=yes if arch=x86_64?
If i build for x86_64, armv7, arm64, i can do a lipo to merge the archs into a single .a?

@naithar i just did as the tutorial here: https://github.com/godotengine/godot-ios-plugins and it's working everything really great, but i have some doubts:

How can i use the .xcframework with .gdip?
The parameter plugin=<plugin_name>  is such as the target_name?
If i build just for release_debug i still need to build for release or debug?
Is still needed to put simulator=yes if arch=x86_64?
If i build for x86_64, armv7, arm64, i can do a lipo to merge the archs into a single .a?

I've already answered some of this questions multiple times in this thread :)

simulator flag was added so it would be possible to build for M1 simulator, so yes, you have to use simulator=yes for x86_64 also.
.xcframework support was added so you could provide arm64 binary for both simulator and device. Right now xcframework support was added only in master and is waiting to be cherry-picked into 3.2. Until it's cherry-picked you can lipo x86_64-simulator, arm64-device and armv7-device together to get fat binary. When xcframework support makes it into 3.2 you will have to lipo device and simulator binaries separately to make xcframework out of them. An example scripts is generate_static_library and generate_xcframework. Without xcframework support there is no point in building arm64-simulator
godot-ios-plugins repo is constrained by plugins it provides, so there is no point in using target_name. My apns plugin template should be more flexible in that respect with it's target_name. But if you managed to make it work with plugin there is no reason to switch. @war1an can probably explain it better.
Once again release_debug compile configuration is essentially a debug configuration for export teplate. So in case you want to support both release and debug export template you have to build both release_debug (and rename it to debug later) and release configurations.

I've already answered some of this questions multiple times in this thread :)

simulator flag was added so it would be possible to build for M1 simulator, so yes, you have to use simulator=yes for x86_64 also.
.xcframework support was added so you could provide arm64 binary for both simulator and device. Right now xcframework support was added only in master and is waiting to be cherry-picked into 3.2. Until it's cherry-picked you can lipo x86_64-simulator, arm64-device and armv7-device together to get fat binary. When xcframework support makes it into 3.2 you will have to lipo device and simulator binaries separately to make xcframework out of them. An example scripts is generate_static_library and generate_xcframework. Without xcframework support there is no point in building arm64-simulator
godot-ios-plugins repo is constrained by plugins it provides, so there is no point in using target_name. My apns plugin template should be more flexible in that respect with it's target_name. But if you managed to make it work with plugin there is no reason to switch. @war1an can probably explain it better.
Once again release_debug compile configuration is essentially a debug configuration for export teplate. So in case you want to support both release and debug export template you have to build both release_debug (and rename it to debug later) and release configurations.

Thanks a lot!

Thanks a lot!

@gustavottc plugin xcframework support have been merged and should be available as part of RC1 release. So you can start porting recent https://github.com/godotengine/godot-ios-plugins changes to be able to provide correct plugin configuration when 3.2.4 is released.
I've also added extracted headers to plugin release tag, so now there should be no need to directly use Godot's sources.

@gustavottc plugin xcframework support have been merged and should be available as part of RC1 release. So you can start porting recent https://github.com/godotengine/godot-ios-plugins changes to be able to provide correct plugin configuration when 3.2.4 is released.
I've also added extracted headers to plugin release tag, so now there should be no need to directly use Godot's sources.

@naithar just finished testing the share plugin that allows sharing of text and images. Everything works and also the size of xcframework is 350kb compared to 9mb of the .a version, sweet!

@naithar just finished testing the share plugin that allows sharing of text and images. Everything works and also the size of xcframework is 350kb compared to 9mb of the .a version, sweet!

@naithar just finished testing the share plugin that allows sharing of text and images. Everything works and also the size of xcframework is 350kb compared to 9mb of the .a version, sweet!

Size difference is probably due to you using correct compilation flags like release and release_debug and not using debug which produces additional size for a binary so you can get more debug info from it.

@naithar just finished testing the share plugin that allows sharing of text and images. Everything works and also the size of xcframework is 350kb compared to 9mb of the .a version, sweet!

Size difference is probably due to you using correct compilation flags like release and release_debug and not using debug which produces additional size for a binary so you can get more debug info from it.

https://github.com/godotengine/godot/pull/45685 should allow to specify required build flags in plugin configuration directly, which should simplify plugin setup.

@naithar Does this plugin Godot iOS Apple Push Notifications plugin supports local notifications as well?

@naithar Does this plugin Godot iOS Apple Push Notifications plugin supports local notifications as well?

It’s main purpose is to enable push notifications support - it adds required app delegate methods, asks for user permission and returns push notification device token. The code which would show and process notifications should be added in other plugins like it’s done in  https://github.com/naithar/godot_ios_plugin_apns
Local notifications require permissions too, but they don’t need additional app delegate methods or device token to work. So there is no real need for this plugin if your aim is to provide only local notification support - permissions can be requested separately.

Also note that debug configuration that is used for export templates is actually a release_debug configuration. SO you'll need to build a release_debug configuration and later rename it into debug yourself.

@naithar i know you said to rename the release_debug to debug, but it's really needed?
Actually i'm using with this way and it's seems to be working fine

I know the debug flag will give more information when testing and be more, and the release will be lighter and will give less information.
And this release_debug is a merge of debug and release binaries, but when exporting the project the Godot will not choice the right flag of the Plugin with release_debug?
If Export With Debug then will choice the debug if not, then will be release?

Ty for your patience and attention, i'm still a beginner on this.

@gustavottc there is an updated documentation at https://docs.godotengine.org/en/3.3/tutorials/platform/ios/ios_plugin.html.
This section describes the way binary field works.
binary: this should be the filepath of the plugin library (a or xcframework) file.
The filepath can be relative (e.g.: MyPlugin.a, MyPlugin.xcframework) in which case it's relative to the directory where the gdip file is located.
The filepath can be absolute: res://some_path/MyPlugin.a or res://some_path/MyPlugin.xcframework.
In case you need multitarget library usage, the filename should be MyPlugin.a and .a files should be named as MyPlugin.release.a and MyPlugin.debug.a.
In case you use multitarget xcframework libraries, their filename in the configuration should be MyPlugin.xcframework. The .xcframework files should be named as MyPlugin.release.xcframework and MyPlugin.debug.xcframework.

Renaming release_debug to debug only required if you want to enable plugin correctly support different Godot targets, making it multitarget.
If you specify binary as name.a and Godot doesn't find the file named name.a it will try to search for name.release.a and name.debug.a.
I recommend making plugin multitarget as debug and non-debug iOS templates has different build flags, which could result in bugs or even crashes if you use incorrect plugin binary.
For testing purposes I guess it's okay to use single binary for all cases, but release should probably support both targets just in case.

@naithar Thanks! I think this solved my question, i was in doubt because here the script generate_static_library.sh can be build to <debug|release|release_debug>, so i was like "why rename release_debug to debug if already was a debug"
But I understood: Godot uses release_debug. The target debug exists in case the developer wants more data when testing the plugin, but the correct thing is to send the users of the plugin the release_debug as debug, and makes this name change to avoid confusion, and use release as release.

But I understood: Godot uses release_debug. The target debug exists in case the developer wants more data when testing the plugin, but the correct thing is to send the users of the plugin the release_debug as debug, and makes this name change to avoid confusion, and use release as release.

Yeah, that's about right :)

@naithar , i did a restructure of the plugin and i created a folder called src and inside main, module and formats, i want to Xcode builds these files but i'm not dealing with that, can you help me?

The SCons build correctly because i put to build on these folders, but on Xcode not, and will be very helpful if Xcode builds because will show erros/warnings.
You can check the project here: https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/tree/iOS-Plugin/ios/plugin

You should probably readd source files and frameworks to the project, but use different export settings like this:

You don't really need to include full directory structure - just folder containing sources or just files is enough.
Also you don't need to specify full path to dependency frameworks. Just $(PROJECT_DIR)/..<whatever to make path correct>../lib/** is enough. When you will drag dependency frameworks to the Link Binary With Libraries build phase, this setting should also fix itself automatically.

@naithar , Thank you! It works.
The AdMob SDK version i'm using for develop is 8.3.0.
But i have a strange error:
The Interstitial.mm is showing this error:

But i'm importing the Intertitial.h correctly here:

Which is importing the os_iphone.h here:

Ps: On SCons works normally

Ps: On SCons works normally

Your header search path might be wrong, you can check if Xcode uses correct header search paths at Report navigator here:

You should also check if you are using correct defines, including IPHONE_ENABLED, since it is required for most of the iphone platform code:
#ifdef IPHONE_ENABLED

#ifndef OS_IPHONE_H
#define OS_IPHONE_H

#include "core/os/input.h"
#include "drivers/coreaudio/audio_driver_coreaudio.h"
#include "drivers/unix/os_unix.h"
#include "joypad_iphone.h"

#include "ios.h"
#include "main/input_default.h"
#include "servers/audio_server.h"
#include "servers/visual/rasterizer.h"
#include "servers/visual_server.h"

extern void godot_ios_plugins_initialize();
extern void godot_ios_plugins_deinitialize();

class OSIPhone : public OS_Unix {

You can check them at SConstruct file and add them to the Other C Flags and Other C++ Flags, like you've already did with -DTYPED_METHOD_BIND and others.

@naithar it works when i added these flags: '-DIPHONE_ENABLED', '-DUNIX_ENABLED', '-DCOREAUDIO_ENABLED' thanks!

@naithar Thank you so much for your help, the version 3.3 is now released as stable and everything with the new plugin is working! I will close the issue since i merged the change.
https://github.com/Poing-Studios/Godot-AdMob-Android-iOS/commit/37ec5212569645657c483f03ccf870508817bfc4