Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity game crashes only on iOS admob interstitial

Discussion in 'Getting Started' started by KLMWEB, Dec 26, 2022.

  1. KLMWEB

    KLMWEB

    Joined:
    Nov 29, 2022
    Posts:
    4
    Hi friends i have this problem when i want to test my game on my phone
    when i put the ads admob test is not crashed but when i add real ads ios on my game its crashed
    but this problem i only on interstitial script i rewrite it but nothing change its the same problem

    this is messages of my xcode when crashes the game

    #include <UnityFramework/UnityFramework.h>

    UnityFramework* UnityFrameworkLoad()
    {
    NSString* bundlePath = nil;
    bundlePath = [[NSBundle mainBundle] bundlePath];
    bundlePath = [bundlePath stringByAppendingString: @"/Frameworks/UnityFramework.framework"];

    NSBundle* bundle = [NSBundle bundleWithPath: bundlePath];
    if ([bundle isLoaded] == false) [bundle load];

    UnityFramework* ufw = [bundle.principalClass getInstance];
    if (![ufw appController])
    {
    // unity is not initialized
    [ufw setExecuteHeader: &_mh_execute_header];
    }
    return ufw;
    }

    int main(int argc, char* argv[])
    {
    @autoreleasepool
    {
    id ufw = UnityFrameworkLoad();
    [ufw runUIApplicationMainWithArgc: argc argv: argv]; Thread 1: "kUnityDidQuit"
    return 0;
    }
    }

    Can not play a disabled audio source
    Can not play a disabled audio source
    Can not play a disabled audio source
    Can not play a disabled audio source
    Can not play a disabled audio source
    libc++abi: terminating with uncaught exception of type Il2CppExceptionWrapper
    dyld4 config: DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
    terminating with uncaught exception of type Il2CppExceptionWrapper
    (lldb)


    Please i want to fix this problem thank you so much
     
  2. KLMWEB

    KLMWEB

    Joined:
    Nov 29, 2022
    Posts:
    4
    This is my script interstitial
     

    Attached Files:

  3. KLMWEB

    KLMWEB

    Joined:
    Nov 29, 2022
    Posts:
    4
    picture from the inside
     

    Attached Files:

  4. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    1) Use CODE tags
    2) Use CODE tags
     
  5. KLMWEB

    KLMWEB

    Joined:
    Nov 29, 2022
    Posts:
    4
    Can you explain more
     
  6. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    When you're displaying C# code, the regulars like it when you use CODE tags.

    Such as...
    Code (CSharp):
    1. Using UnityEngine
    2.