Post not yet marked as solved
264
Views
I'm using nib files not Swift UI, and trying to get attributed text in a TextView to be localized as well as scale for accessibility - Dynamic Type specifically for larger fonts set in Settings -> Accessibility.
I haven't found anything in the Apple documentation, but I'm assuming attributed text is not supported in localization or accessibility. Does SwiftUI address this somehow? The "scaling fonts automatically" docs from Apple only mention using plain text in IB.
Has anyone found a workaround, fix or an elegant custom solution to handle this? 3rd party OSS framework??
My first thought is to build the attributable text programmatically, using localized strings, then scale up the font size programmatically based on PreferredContentSizeCategory from the traitCollectionDidChange() notification.
TIA.
Post not yet marked as solved
240
Views
Currently working on a medical at home testing app that has to comply with certain FDA guidelines for accessibility. Mainly, larger font sizes.
I understand how Dynamic Type works and that seems to be working fine so far - however, when I add a UIButton to my nib and set its Title font to style "Title 3" (for example, so that it scales with System settings), the font scales up and becomes invisible because the button itself is not scaling. I end up with an ellipse for the button Title. Also, if the button did scale it would really impact the UI in terms of the design that I am coding to.
Is there any best practice or guide for how to handle this? Should I just ignore button accessibility? Any tips or advice is appreciated.
Post not yet marked as solved
110
Views
I have an Objective-C project with Swift classes and a Swift bridging header. I also have a binary XCFramework included in the project which has its own Swift UIView classes. The XCFramweork's swift views are public, like public class ThisView: UIView {}.
The problem is that in my main project, in any Swift class, I can't create an instance of ThisView() - Xcode complains "Cannot find ThisView in scope". I tried importing the name of the XCFramework at the top of the Swift class, but it does nothing.
My Swift class can see obj-c code from the XCFramework via the bridging header imports, but not other Swift classes that are in the Framework. Is this due to the bridging header in the main project? Any other ideas? The framework is copied into the project's local directory, not using pod or carthage.
TIA
Post not yet marked as solved
87
Views
Hello - I want to include a binary XCFramework in a project which has a single static library target. The static library is a hard requirement, meaning it can't change from how it exists now. What I need to do is add an XCFramework (binary since we want the implementation code to be hidden / secure). From there I want to access the Framework code that's exposed via public headers, from my .swift files in my static library.
I know that static libraries don't have any concept of Bundle or file system, so it seems to me that this is not possible. Any suggestions?
Post not yet marked as solved
777
Views
I have the following code as a test example:extension BLEViewController: CBCentralManagerDelegate {
func centralManagerDidUpdateState(_ central: CBCentralManager) {
switch central.state {
case .unknown, .resetting, .unsupported, .unauthorized, .poweredOff:
print("central.state is .poweredOff")
case .poweredOn:
print("central.state is .poweredOn")
centralManager.scanForPeripherals(withServices: nil)
}
}
func centralManager(_ central: CBCentralManager,
didDiscover peripheral: CBPeripheral,
advertisementData: [String : Any],
rssi RSSI: NSNumber) {
print(peripheral)
}
}When I run this on my iPhone 8 with iOS 11.4 it finds my BLE peripheral and the peripheral also shows up in Settings->Bluetooth->"Other Devices". On iOS 12.1 and 12.1.1 Beta it does not find my BLE peripheral, yet the peripheral will show up in Settings->Bluetooth->"Other Devices".Anyone having issues like this with 12.1? TIA.
Post not yet marked as solved
338
Views
I'm implementing CoreBluetooth on iOS. I'm using iOS for both the central and the peripheral. My peripheral is running on iPhone 6+ with iOS 11.4 and the central is running on iPhone 8 with iOS 11.4. I know everything is setup correctly as I can read the service's CBMutableCharacteristic when I create it like this:keyCharacteristic = CBMutableCharacteristic(type: charUUID,
properties: [.read],
value: "test char".data(using: .utf8)!,
permissions: [.readable])This works - when I start up my central I get the characteristic value when `didUpdateNotificationStateFor characteristic` is called.Now I change my char to writeable, call peripheral.writeValue() and it returns `<>` as the value:keyCharacteristic = CBMutableCharacteristic(type: charUUID,
properties: [.read, .write],
value: nil,
permissions: [.readable, .writeable])writing from central, I get didUpdateValue call, then didUpdateNotificationStateFor, then didWriteValueFor. The characteristic value in didWriteValueFor is `<>` instead of the Data passed in: func peripheral(_ peripheral: CBPeripheral,
didUpdateValueFor characteristic: CBCharacteristic,
error: Error?) {
print(String(data: characteristic.value!, encoding: .utf8)!)
}
func peripheral(_ peripheral: CBPeripheral,
didUpdateNotificationStateFor characteristic: CBCharacteristic,
error: Error?) {
print("didUpdateNotificationStateFor ")
print("characteristic VALUE: \(String(data: characteristic.value ?? "nil".data(using: .utf8)!, encoding: .utf8)!)")
if p2pChar != nil {
gatewayPeripheral.writeValue("HelloWorldinitialvalue".data(using: .utf8)!,
for: p2pChar!,
type: .withResponse)
}
}
func peripheral(_ peripheral: CBPeripheral,
didWriteValueFor characteristic: CBCharacteristic,
error: Error?) {
print("didWriteValueFor \(String(data: characteristic.value ?? "nil".data(using: .utf8)!, encoding: .utf8)!)")
}
This is the characterstic print<CBCharacteristic: 0x1c00a42c0, UUID = F0646A14-B60F-DDDD-DDDD-AC114C9ACACAC, properties = 0x8A, value = <>, notifying = NO>I also changed characteristic and writeValue() to `.withoutResponse` and this produces same resut and doesn't call didWriteValue of CBPeripheralDelegate.Any ideas? I called this a few times consecutively while the peripheral was advertising and still same results.TIA
Post not yet marked as solved
300
Views
I'm specifically wondering if custom views that are animated from the bottom or top of screen should be handled differently for iPhone X. For example, should they continue to slide out from the top and pass through the notch, or animate in from below the notch starting at the Safe Area top position? Same for bottom Safe Area.I did not see any reference to this in Apple UI guidelines. Obviously this is custom behavior, so I didn't expect it to be there. Just wondering what everyone else has decided to do.TIA.
Post not yet marked as solved
262
Views
From what I can tell, iOS sets EKEventAvailability to "Busy" when user sets Maybe or Yes status on a calendar invite. For example, I get an invite on my iOS Calendar and tap Maybe button. Now I run my iOS code to retrieve my calendar events. The EKEventAvailability field is the same whether I respond to the invite as Maybe or Yes. So my question is why isn't the "Tentative" value set for a Maybe state? When does Calendar use the Tentative flag?Field EKEventStatus is set to "Confirmed" for both Maybe and Yes, so it seems like Tentative is not really used or supported.TIA.
Post not yet marked as solved
737
Views
In Analytics crash reports, if crashes are showing does that mean the crash logs are from users who agreed to send Diagnostic data? If so, why are those crash logs not showing up in XCode 8.3.3 Organizer? I have crash reports in Organizer from previous app versions (for multiple apps) but for latest releases and in XCode 8.3.3 they do not show up, even though they are in iTunes Connect Analytics.TIA.
Post not yet marked as solved
303
Views
I have several apps in the app store and they are all showing some crash reports for last 30 days (when looking in App Analytics), yet none of the crash logs are showing in XCode Organizer. Are they now somewhere else in XCode 8.3.3? I don't see anywhere in App Analytics to view them.
Post not yet marked as solved
318
Views
I wasn't sure what Forum was appropriate for this question. Basically, it's 2016 and when I uninstall an app via Launchpad (long press, click x button) the app still leaves behind files in /Library/Application Support and in Application cache, etc. Doesn't Apple provide some guidance or Frameworks to handle this?? NSUnistall? NSCleanupMyRoom? I just deleted Dash and there's still a >1GB dir in /Application Support.I know Adobe provides their own uninstallers, but it seems like there should be Framework support for this for all Mac devs. Should indie mac devs be including uninstall programs as well?
Post not yet marked as solved
664
Views
Huge long list of simulators with UDID's. WHY?? Have seen this since Beta 4...see attached image.