Post

Replies

Boosts

Views

Activity

(Flutter app in Ipad) [LayoutConstraints] Unable to simultaneously satisfy constraints.
I have a flutter app which in android runs perfectly and in iOS it used to work too I made a build and run on an iPad, it started the application properly but when I click on a textField it throws this error: Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) ( "NSAutoresizingMaskLayoutConstraint:0x283112530 h=--& v=--& _UIButtonBarButton:0x1041a9660.height == 0 (active)", "NSLayoutConstraint:0x283110cd0 V:|-(6)-[_UIUCBKBSelectionBackground:0x1041e3960] (active, names: '|':_UIButtonBarButton:0x1041a9660 )", "NSLayoutConstraint:0x283113d40 _UIUCBKBSelectionBackground:0x1041e3960.bottom == _UIButtonBarButton:0x1041a9660.bottom - 6 (active)" ) Will attempt to recover by breaking constraint NSLayoutConstraint:0x283113d40 _UIUCBKBSelectionBackground:0x1041e3960.bottom == _UIButtonBarButton:0x1041a9660.bottom - 6 (active) Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger. The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in UIKitCore/UIView.h may also be helpful. Any idea about what I have to do? I don't change any swift code except the AppDelegate to be able to receive push notifications, this problem will I have to change something in swift part or in flutter part?
1
0
1k
Apr ’21
Error DVTAssertions while running a flutter app on iPad
I have a flutter app which runs perfectly in Android and I runned it on iOS in the past. But now when I try to do 'flutter run' in an iPad it throws this error: Error output from Xcode build: ↳ 2021-04-19 15:35:36.697 xcodebuild[40866:300167] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371 Details: (null) deviceType from 00008101-00126D441E38001E was NULL when -platform called. Object: DTDKMobileDeviceToken: 0x7fd06bf0ad60 Method: -platform Thread: NSThread: 0x7fd06b93d400{number = 4, name = (null)} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. 2021-04-19 15:35:37.102 xcodebuild[40866:300280] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371 Details: (null) deviceType from 00008101-00126D441E38001E was NULL when -platform called. Object: DTDKMobileDeviceToken: 0x7fd06bf0ad60 Method: -platform Thread: NSThread: 0x7fd06b89fb80{number = 7, name = (null)} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. 2021-04-19 15:35:37.254 xcodebuild[40866:300280] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-17705/DTDeviceKitBase/DTDKRemoteDeviceData.m:371 Details: (null) deviceType from 00008101-00126D441E38001E was NULL when -platform called. Object: DTDKMobileDeviceToken: 0x7fd06bf0ad60 Method: -platform Thread: NSThread: 0x7fd06b89fb80{number = 7, name = (null)} Please file a bug at https://feedbackassistant.apple.com with this warning message and any useful information you can provide. BUILD FAILED I've never seen a message like this, What can I do to solve it?
6
2
7.5k
Apr ’21
I can't receive push notifications when the app is not opened (FCM-Flutter)
I have a flutter app that sends notifications to the users according to some actions. In the android part, all works fine, but in iOS part I only can receive messages if the app is opened. If I send a message with the app in background it did not receive, will only receive when I open the app again. To do it I'm using FirebaseMessaging 7.0.3 Things I tried until now: Create a key in developers.apple and apply it within firebase Feed my project with googleservices.plist Turn on Push Notifications and Background Modes, and enable Background fetch and Remote notifications under Background Modes. Added this code in my info.plist: <key>FirebaseScreenReportingEnabled</key> <true/> <key>FirebaseAppDelegateProxyEnabled</key> <false/> And in AppDelegate.swift, I already tried this two codes: 1 (from FirebaseMessaging documentation) import UIKit import Flutter @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { &#9;override func application( &#9;&#9;_ application: UIApplication, &#9;&#9;didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? &#9;) -> Bool { &#9;&#9;if #available(iOS 10.0, *) { &#9;&#9;&#9;UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate &#9;&#9;} &#9;&#9;GeneratedPluginRegistrant.register(with: self) &#9;&#9;return super.application(application, didFinishLaunchingWithOptions: launchOptions) &#9;} } and 2 import UIKit import Flutter import Firebase @UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { &#9;override func application( &#9;&#9;_ application: UIApplication, &#9;&#9;didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? &#9;) -> Bool { &#9;&#9;if #available(iOS 10.0, *) { &#9;&#9;&#9;UNUserNotificationCenter.current().delegate = self &#9;&#9;&#9;let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound] &#9;&#9;&#9;UNUserNotificationCenter.current().requestAuthorization( &#9;&#9;&#9;&#9;options: authOptions, &#9;&#9;&#9;&#9;completionHandler: {_, _ in }) &#9;&#9;} else { &#9;&#9;&#9;let settings: UIUserNotificationSettings = &#9;&#9;&#9;UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil) &#9;&#9;&#9;application.registerUserNotificationSettings(settings) &#9;&#9;} &#9;&#9;application.registerForRemoteNotifications() &#9;&#9;FirebaseApp.configure() &#9;&#9;GeneratedPluginRegistrant.register(with: self) &#9;&#9;return super.application(application, didFinishLaunchingWithOptions: launchOptions) &#9;} } The second one arrives the messages with the app opened, with the first one it don't arrives at all. I tried too create a new identifier from 0 in xcode and still i'm having the same result. This is my dart sendNotification method: Future sendNotification(String body, String title, bool isAdm) async { &#9;final String url = 'https://fcm.googleapis.com/fcm/send'; &#9;var notification; &#9;notification = &#9;'{"notification": {"body": "${body}", "title": "${title}", "content_available": "true", "click_action": "FLUTTER_NOTIFICATION_CLICK"}, "priority": "high", "to": "MYTOPIC"}'; &#9;final response = await http.post( &#9;&#9;&#9;url, &#9;&#9;&#9;headers: <String, String>{ &#9;&#9;&#9;&#9;"Content-Type": "application/json", &#9;&#9;&#9;&#9;"Keep-Alive": "timeout=5", &#9;&#9;&#9;&#9;"Authorization": "key=MYKEY" &#9;&#9;&#9;}, &#9;&#9;&#9;body: notification &#9;); &#9;print(response.body); } What I'm missing here? How could I handle this messages in background? If you need more info, I Could add
1
0
16k
Jan ’21