Open shankarphadatare opened 5 years ago
Can someone please comment on this from the NS team??? We are experiencing the exact same issue with Angular Nativescript + Embedding in IOS. we swap the sample project with a vanilla NS project, it works instantly, swap back to Angular and change the function in the Native IOS app out to bootstrap Angular and it fails again with the exact same error Error: A Frame must be used to navigate to a Page
and our page ONLY contains <page-router-outlet></page-router-outlet>
@tdermendjiev you are the man? any way you can try an Angular7 embed or do you have any ideas on how to fix the Frame must be used error?
@rdlauer @zahhak @NickIliev - I'm not sure who should be tagged for this issue; but apparently NS-Angular apps can't work with this anymore.
The closest thing we've gotten to work (besides Vanilla TS working fine), is telling the bootstrap process to bootInExistingPage: true
which doesn't give us a frame error, and actually gives us the Angular is running in the development mode. Call enableProdMode() to enable production mode.
console.log, So the angular app starts to work, but when we use the bootInExistingPage, it never actually slides over to a view, it does nothing. Also we are using <page-router-outlet>
like we should, so we "shouldn't" be calling bootInExistingPage anyway? correct. I am just trying everything I can to make it work so that was one of my attempts.
@zurie @shankarphadatare - this was an experimental feature that is not officially supported by the framework. My guess by reading the symptoms is that the latest features in the framework that provide flexibility for the root element of the NS app broke this sample app at some point.
Fixing this sample and providing a reliable story for embedding NativeScript apps into existing native apps is out of the scope of work for the NativeScript team for next releases. Of course, if this is a feature that is important for your project - pull requests are always welcome.
@etabakov can you point me in the right direction regarding your statement? I have been trying to poke around and make something work but haven't had much luck.. It seems like its a simple fix considering the TS version works / the angular version works without the frame, I wonder if someone with more intimate knowledge of the process could give me any insight possible into helping me tackle this one. The documentation is good enough to get it working (on TS) so i think rewriting a story and putting a ton of time fixing this sample isn't necessary but if we found the missing frame issue it would help a lot of people who rely on NativeScript and have chosen angular as their platform.
My guess by reading the symptoms is that the latest features in the framework that provide flexibility for the root element of the NS app broke this sample app at some point.
@etabakov can you point me in the right direction regarding your statement? I have been trying to poke around and make something work but haven't had much luck.. It seems like its a simple fix considering the TS version works / the angular version works without the frame, I wonder if someone with more intimate knowledge of the process could give me any insight possible into helping me tackle this one. The documentation is good enough to get it working (on TS) so i think rewriting a story and putting a ton of time fixing this sample isn't necessary but if we found the missing frame issue it would help a lot of people who rely on NativeScript and have chosen angular as their platform.
My guess by reading the symptoms is that the latest features in the framework that provide flexibility for the root element of the NS app broke this sample app at some point.
@zurie @etabakov I agree with Zurie if somebody fix frame issue then it would be helpful to the people thinking to use Nativescript platform.
@zurie @shankarphadatare Guys, did you ever succeed with this? I am trying NS v8 and can't get it to work, the key problem is that I am not able to access the NS runtime from Swift/Objective C.
When i run iOS xcode project with embedded nativescript frameworks and nativescript code, apps gives error when try to show/load nativescript pages into xcode console: Error: Error: A Frame must be used to navigate to a Page.
Below are the my Objective-c Function which starts loading NativeScript pages on iOS button tap event.
Button Tap Event Code in HomeViewController.swift
TNSManager.m file's scriptStringToLoad function code
TNSManager.m file's _runScript function code
Below is NativeSctipt part: 1. app.module.ts file code
2. app.component.ts file code
3. app.component.html file code
Throws error when i click Native iOS button and try to show NativeScript Page. Error is as below. Error: Error: A Frame must be used to navigate to a Page