Capacitor 5, How get localfiles assets on Capacitor/IOS

Hi, community!
How get assets local on capacitor/ios with HttpClient Angular?
URL in image
Environment:

  • Capacitor 5
  • Angular 16
  public myGet(
    url: string,
    hideLoader = false,
    errorHandler?: (err: any, caught: Observable<any>) => ObservableInput<{}>,
    responsive = null
  ): Observable<any> {
    if (!hideLoader) {
      this.events.publish('loading:start');
    }
    return this.httpClient.get(url, options).pipe(
      map((response) => response),
      catchError(errorHandler ? errorHandler : this.handleError),
      finalize(() => {
        if (!hideLoader) {
          this.events.publish('loading:finish');
        }
      })
    );


In Web && Android This working fine!

I’m Try transform url adding: capacitor://localhost:/assets…, but notworking
Try Using CapacitorHttp but have this errors:

CapacitorConfig:

const config: CapacitorConfig = {
  appId: 'example.app',
  appName: 'App',
  webDir: '../../dist/apps/app',
  server: {
    cleartext: true
  },
  bundledWebRuntime: false,
  plugins: {
    CapacitorCookies: {
      enabled: true
    },
    CapacitorHttp: {
      enabled: true
    },
    PushNotifications: {
      presentationOptions: ['badge', 'sound', 'alert']
    },
    SplashScreen: {
      launchShowDuration: 2000,
      backgroundColor: '#79c000',
      showSpinner: false,
      splashFullScreen: true,
      splashImmersive: true
      // layoutName: "launch_screen",
      // useDialog: true
    }
  }
};

Hi solution is:
To not move the code (of an application already made).
It is better to make it an interceptor and have it redirect.

if(this.platform.is("ios") && url.include("assets")){

const baseHref = window.location.origin + '/' + url;
 fetch(baseHref).then(async (res) => {
        const data = await res.json();
        return data;
      })
}

This windows.location.origin = capacitor://localhost/…
PD:
Not working in android for hostname localhost