Posts

Post not yet marked as solved
5 Replies
731 Views
I need to log to OSLog and into a file in parallel (due to OSLogStore not being able to provide old logs (FB13191608)). In Objective-C I can accomplish this with a macro using __FILE__ and __LINE__ in the macro implementation which still reference the position in the original code. I tried to create a Swift macro to make this work from Swift. However, log() takes the file and line number of the macro definition file instead of the position in the calling code. So when I click on the metadata link, I'm taken to the macro instead of the calling location. Is there any solution to that? #file and #line are correctly set in the macro but there’s no way to specify file and line number to the log() function (FB13204310).
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
1 Replies
926 Views
In my application using UICollectionViewDiffableDataSource and compositional layout, I saw this exception Thread 1: "This solver does not handle estimated items so this method does nothing. Are you calling this in error?" that was thrown in dataSource.apply(snapshot, animatingDifferences: animated). I don't understand what it is telling me and how I should fix it. Any idea?
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
I'm trying to implement App Intents and App Shortcuts on watchOS. To do that, I included my AppIntent and my AppShortcutsProvider to the WatchKit extension target. The intent has one variable parameter: @Parameter(title: "Category", description: "Category", requestValueDialog: "What are you searching for?") var category: String However, when I speak the invocation phrase to Siri on the watch, Siri immediately responds there's something wrong. My perform() method isn't even called and there's nothing in the log. Is this supposed to work? How could I debug this? Is there a sample app showing App Intents on watchOS?
Posted
by ortwin.
Last updated
.
Post marked as solved
3 Replies
1.8k Views
We're validating app receipts and use the original_purchase_date and original_application_version to determine if the user is a legacy user and thus entitled to certain privileges. (We moved from paid to freemium and give legacy users free access to features now requiring a subscription.) Now we're wondering what values the above fields have if the user purchased an app bundle (consisting of two apps). Is the receipt for both apps the same? If yes, which bundle_id and which original_application_version is sent in the receipt? If not, how is original_application_version set? (According to the version of each app at purchase time?) How is original_purchase_date set? (According to the bundle purchase date? Or the first installation date of each app? – one of the apps could be installed much later!)
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
1 Replies
854 Views
I implemented keyboard navigation in my iOS app. Now I'm wondering what the best shortcut might be for a "Cancel" button/action. On the Mac, I'd assume ESC is a good choice but the iPad Smart Keyboard doesn't even have that key.
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
0 Replies
976 Views
I use Xcode StoreKit Testing on the Simulator to test auto-renewable subscriptions. After a purchase, I parse the receipt. I noticed that purchaseDate, subscriptionExpirationDate (and cancellationDate if cancelled later) are all reported as UTC dates in the receipt even though they are local dates. So all dates are wrong by the offset of the local time zone towards UTC. I've verified with two independent ASN.1 receipt parsing libraries (https://github.com/nomad/venice and https://github.com/IdeasOnCanvas/AppReceiptValidator which has a nice Mac demo app) and even converted the purchase_date_ms/expires_date_ms/cancellation_date_ms that all confirm the 1h offset (I'm on CET which is UTC +1). I can't imagine doing anything wrong in my code since the receipt is generated by the StoreKit Testing system. Is this is known issue? (logged as FB8999149)
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
3 Replies
4.1k Views
When building an app using Xcode 10 and running it on iOS 13.0 beta 3, standard table view cells have a white background color that is almost indistinguishable from the table view background. When building the same app using Xcode 11 beta (or when deploying it to an iOS 12 device), the selection style has a gray background as usual.Did I do anything wrong here? Or is this a bug in iOS which I suspect? (Filed as FB6424669)
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
1 Replies
867 Views
Just noticed this exception when testing my app on iOS 13:[TraitCollection] Class _UISearchPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API. [TraitCollection] Class _UISearchFormSheetPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API. [TraitCollection] Class _UISearchPopoverPresentationController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API. *** Assertion failure in -[_UINavigationBarVisualProviderModernIOS animateForSearchPresentation:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore/UIKit-3861/_UINavigationBarVisualProviderModernIOS.m:1521 Hosted search should take a different code pathThe warning about overriding traitCollection getter is no appropriate as I don't do this in my code.The app was built against the iOS 12 SDK. Is this a known issue? Is this a bug in UIKit or on my side?
Posted
by ortwin.
Last updated
.
Post not yet marked as solved
1 Replies
3.5k Views
I have a UINavigationBar with barStyle = .black and a UIVisualEffectView with blur effect placed underneath it that matches the navigation bar's blur effect. This works fine in iOS 12 using UIBlurEffectStyleDark. However, in iOS 13 (even when building against the iOS 12 SDK), the blur effect is considerably darker.How can I fix this? Ideally, I'd like to update the blur effect by building against the iOS 12 SDK.
Posted
by ortwin.
Last updated
.