ios13

Distinguish between iPad and mac on iPad with iPadOs

耗尽温柔 提交于 2019-12-06 02:49:25
问题 In iOS 13 apple changed the user-agent that iPad uses. Instead of (for example) Mozilla/5.0( iPad ; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10 it become (for example) Mozilla/5.0 ( Macintosh ; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 My question is how can we distinguish between iPad and mac now? 回答1: The condition I used to detect IpadOS: ua.toLowerCase()

UISegmentedControl.noSegment stopped working with Xcode 11, iOS 13 [duplicate]

旧街凉风 提交于 2019-12-05 20:37:43
This question already has an answer here: Specifying UISegmentedControlNoSegment to UISegmentedControl's selectedSegmentIndex has no Effect on iOS 13 3 answers I've had two segmented controls stacked on top of each other, each with two options, so there's a 2x2 grid of filtering options for a search field. This has worked fine, but I just updated to Xcode 11 and UISegmentedControl.noSegment has stopped working when I try to update it in response to user selection. However, it works when I set the initial value to .noSegment in the property observer. isMomentary is set to false. The outlets are

How to fix “IPA processing failed” error in xcode 11?

拟墨画扇 提交于 2019-12-05 19:39:28
问题 When I tried to create IPA file using Distribute APP option. It gave "IPA processing failed" error. I have checked logs file: IDEDistribution.standard.log file. 2019-08-06 18:36:52 +0000 warning: Configuration issue: platform iPhoneSimulator.platform doesn't have any non-simulator SDKs; ignoring it Scanning IPA... 2019-08-06 18:36:52 +0000 Assertion failed: Expected 4 archs in otool output: /var/folders/4t/rpjk7pd55t16jfrd32y98gf0lb2t68/T/IDEDistributionOptionThinning.~~~a4cZJc/Payload/demo

iOS 13 UITableViewCell custom accessoryView goes out of bounds

我们两清 提交于 2019-12-05 18:23:19
Working with the latest iOS 13 beta I really don't understand if it's beta issues or my issue, but I don't have this problem with iOS 12 code let button = UIButton(type: .custom) button.setTitle("connect", for: .normal) button.backgroundColor = UIColor(rgb: 0xFF0E83) button.sizeToFit() cell.accessoryView = button cell.textLabel?.text = "Title" cell.detailTextLabel?.text = "Subtitle" with result Did someone had the same issue and found a solution? Thanks If you put the uibutton in a uiview it will work on iOS 13.0. I am using UILabel instead of UIButton, and same issue occurred with iOS13.1.

Adding a drag gesture in SwiftUI to a View inside a ScrollView blocks the scrolling

点点圈 提交于 2019-12-05 18:22:47
问题 So I have a ScrollView holding a set of views: ScrollView { ForEach(cities) { city in NavigationLink(destination: ...) { CityRow(city: city) } .buttonStyle(BackgroundButtonStyle()) } } In every view I have a drag gesture: let drag = DragGesture() .updating($gestureState) { value, gestureState, _ in // ... } .onEnded { value in // ... } Which I assign to a part of the view: ZStack(alignment: .leading) { HStack { // ... } HStack { // ... } .gesture(drag) } As soon as I attach the gesture, the

iOS 13 not getting VoIP Push Notifications in background

南笙酒味 提交于 2019-12-05 13:34:53
I'm developing a softphone in Swift using CallKit and PushKit. Before iOS 13, VoIP notifications were working perfectly. But after the iOS 13 update, my app isn't getting VoIP push notification when it's in background. In foreground didReceiveIncomingPushWith is called, but in background it isn't called. How can I fix this issue? Code func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. print("\(#function)") let voipPushResgistry =

Xcode 11 Beta - iOS 13 Simulator - UITextField with Placeholder getting app crash

人走茶凉 提交于 2019-12-05 11:06:52
问题 In Xcode 11 Beta Version and iOS 13 Simulator getting a crash when access TextField _placeholderLabel.textColor label key. The key used to apply placeholder text color. [textfield setValue:[UIColor whiteColor] forKeyPath:@"_placeholderLabel.textColor"]; "NSGenericException" - reason: "Access to UITextField's _placeholderLabel ivar is prohibited. This is an application bug" 回答1: You can do it by using runtime: add the following code to the bottom of placeholder setting Ivar ivar = class

@Published property wrapper not working on subclass of ObservableObject

被刻印的时光 ゝ 提交于 2019-12-05 09:14:12
问题 I have a class conforming to the @ObservableObject protocol and created a subclass from it with it's own variable with the @Published property wrapper to manage state. It seems that the @published property wrapper is ignored when using a subclass. Does anyone know if this is expected behaviour and if there is a workaround? I'm running iOS 13 Beta 8 and xCode Beta 6. Here is an example of what I'm seeing. When updating the TextField on MyTestObject the Text view is properly updated with the

Distinguish between iPad and mac on iPad with iPadOs

六眼飞鱼酱① 提交于 2019-12-05 08:49:56
In iOS 13 apple changed the user-agent that iPad uses. Instead of (for example) Mozilla/5.0( iPad ; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10 it become (for example) Mozilla/5.0 ( Macintosh ; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0 Safari/605.1.15 My question is how can we distinguish between iPad and mac now? 来源: https://stackoverflow.com/questions/56934826/distinguish-between-ipad-and-mac-on-ipad-with-ipados

Xcode 11 — SwiftUI's dark mode setup

不问归期 提交于 2019-12-05 08:39:35
Okay. I know this shouldn't be rocket science. I can't seem to get dark mode working and I've read the documentation a few times. Hoping someone can pick out what I'm missing. I have an named color in the asset catalog. I set my plist mode to be in dark mode for easier testing. My content view looks like this: struct ContentView : View { var body: some View { VStack { Text("Hello World") Text("Yo yo yo") .color(Color("darkModeColor")) } } } No matter what I do, the color is ALWAYS of the "Any" appearance when it should be taking on the cyan color. I know dark mode itself works because all the