Background transparent IOS Cocos 3.14 or newer version

Hi,

I try to generate AR app, but i have the following problem with iOS.

i add launchcamera in loadView method of RootViewController.mm

cocos2d::Application *app = cocos2d::Application::getInstance();
    
    // Initialize the GLView attributes
    app->initGLContextAttrs();
    cocos2d::GLViewImpl::convertAttrs();
    
    // Initialize the CCEAGLView
    CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [UIScreen mainScreen].bounds
                                         pixelFormat: (__bridge NSString *)cocos2d::GLViewImpl::_pixelFormat
                                         depthFormat: cocos2d::GLViewImpl::_depthFormat
                                  preserveBackbuffer: NO
                                          sharegroup: nil
                                       multiSampling: NO
                                     numberOfSamples: 0 ];
    
    // Enable or disable multiple touches
    [eaglView setMultipleTouchEnabled:NO];
    // Set EAGLView as view of RootViewController
    eaglView.opaque=NO; //add  to try a solution of transparency background
    eaglView.backgroundColor =[UIColor clearColor];//add  to try a solution of transparency background
    self.view = eaglView;
    cocos2d::GLView *glview = cocos2d::GLViewImpl::createWithEAGLView((__bridge void *)self.view);
    
    //set the GLView as OpenGLView of the Director
    cocos2d::Director::getInstance()->setOpenGLView(glview);
    [self setNeedsStatusBarAppearanceUpdate];
    [self launchCamera]; //this add subview camera view in atIndex:-1
    //run the cocos2d-x game scene
    app->run();

The problem is the background of cocos2d-x render is always black, never set alpha channel to transform black background to transparent background, i try with glclearcolor(0,0,0,0) in diferents ways but i still the problem. we need draw with cocos2d overlay the camera subview.

Thanks for your help.

They to invoke Director::setClearColor() to set clear color. Renderer will use the value to clear color every frame.

Thanks for your time, i try this code when i return my home!!!