-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
from.page-issueReported in a reader-filed concernReported in a reader-filed concerninfra.structureRelates to the tools that create docs.flutter.devRelates to the tools that create docs.flutter.devp2-mediumNecessary but not urgent concern. Resolve when possible.Necessary but not urgent concern. Resolve when possible.
Description
Page URL
https://docs.flutter.dev/add-to-app/ios/add-flutter-screen#create-a-flutterengine
Page source
No response
Describe the problem
The code snippet has incorrect #import at the top:
BAD:
#import <flutterpluginregistrant generatedpluginregistrant.h="">
Also incorrect parameters:
BAD:
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary<uiapplicationlaunchoptionskey, id=""> *)launchOptions {
Also, has a weird end tag
BAD:
</uiapplicationlaunchoptionskey,>
Expected fix
The expected snippet should look like this:
// The following library connects plugins with iOS platform code to this app.
#import <FlutterPluginRegistrant/GeneratedPluginRegistrant.h>
#import "AppDelegate.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary<UIApplicationLaunchOptionsKey, id> *)launchOptions {
self.flutterEngine = [[FlutterEngine alloc] initWithName:@"my flutter engine"];
// Runs the default Dart entrypoint with a default Flutter route.
[self.flutterEngine run];
// Connects plugins with iOS platform code to this app.
[GeneratedPluginRegistrant registerWithRegistry:self.flutterEngine];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@endAdditional context
Seems like this happens anytime we have < or > in a code snippet that is nested within a tab
I would like to fix this problem.
- I will try and fix this problem on docs.flutter.dev.
Metadata
Metadata
Assignees
Labels
from.page-issueReported in a reader-filed concernReported in a reader-filed concerninfra.structureRelates to the tools that create docs.flutter.devRelates to the tools that create docs.flutter.devp2-mediumNecessary but not urgent concern. Resolve when possible.Necessary but not urgent concern. Resolve when possible.