Xcode is showing high energy impact with only single line and my app is heavily bases on realm. And after running the app for a few minute device getting too much heated.
Below is my pod file
target 'Realmtest' do
use_frameworks!
pod 'RealmSwift'
end
Below is my AppDelegate file
import UIKit
import RealmSwift
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
_ = try! Realm() // if I comment this line, energy impact will be zero
return true
}
}
Below is the screenshot of my xcode, which shows high energy impact.
I want to know what i am doing wrong and correct way to use realm. As my whole app is heavily based on realm its become critical for me to fix this and I really didn't get any solution.
// ---- Update I have update the Realm pod and below is the screenshot of my terminal after installation of updated pod.
After updating the pod I am still facing this issue.
from Realm high energy impact xcode
No comments:
Post a Comment