본문 바로가기

Flutter 시작하기

플러터 앱 신규 생성 시 해야 할 것들(기존 ios 프로제트 복사)

반응형

[ios]

-Admob,다국어 등 

Info.plist

[아래 추가]

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-9721742065519552~959587xxxx</string>
<key>io.flutter.embedded_views_preview</key>
<true/>

<key>CFBundleLocalizations</key>
<array>
<string>en</string>
<string>ko</string>
<string>ja</string>
</array>

 

-firebase 연결

GoogleService-Info.plist <-- 복사 할 때 위치 주의

 

-기타 리소스   <- 기존 프로젝트를 복사해서 신규로 할 때 

ios/Runner/Assets.xcassets

 

-pod 

ios/Podfile <-- 없으면 만들어야 하지만 보통은 있음.

[아래 추가]

pod 'Firebase/Analytics' 

 

-swift 

ios/Runner/AppDelegate.swift

[아래 추가]

-import Firebase

-FirebaseApp.configure()

 

import UIKit
import Flutter
import Firebase

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}

반응형