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?
Post
Replies
Boosts
Views
Activity
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?
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 {
	override func application(
		_ application: UIApplication,
		didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
	) -> Bool {
		if #available(iOS 10.0, *) {
			UNUserNotificationCenter.current().delegate = self as? UNUserNotificationCenterDelegate
		}
		GeneratedPluginRegistrant.register(with: self)
		return super.application(application, didFinishLaunchingWithOptions: launchOptions)
	}
}
and 2
import UIKit
import Flutter
import Firebase
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
	override func application(
		_ application: UIApplication,
		didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
	) -> Bool {
		if #available(iOS 10.0, *) {
			UNUserNotificationCenter.current().delegate = self
			let authOptions: UNAuthorizationOptions = [.alert, .badge, .sound]
			UNUserNotificationCenter.current().requestAuthorization(
				options: authOptions,
				completionHandler: {_, _ in })
		} else {
			let settings: UIUserNotificationSettings =
			UIUserNotificationSettings(types: [.alert, .badge, .sound], categories: nil)
			application.registerUserNotificationSettings(settings)
		}
		application.registerForRemoteNotifications()
		FirebaseApp.configure()
		GeneratedPluginRegistrant.register(with: self)
		return super.application(application, didFinishLaunchingWithOptions: launchOptions)
	}
}
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 {
	final String url = 'https://fcm.googleapis.com/fcm/send';
	var notification;
	notification =
	'{"notification": {"body": "${body}", "title": "${title}", "content_available": "true", "click_action": "FLUTTER_NOTIFICATION_CLICK"}, "priority": "high", "to": "MYTOPIC"}';
	final response = await http.post(
			url,
			headers: <String, String>{
				"Content-Type": "application/json",
				"Keep-Alive": "timeout=5",
				"Authorization": "key=MYKEY"
			},
			body: notification
	);
	print(response.body);
}
What I'm missing here? How could I handle this messages in background? If you need more info, I Could add