Post

Replies

Boosts

Views

Activity

Verify Receipt Endpoint Can't Get Passed Mac App Store Review Team
When I use the verify receipt endpoint in my Mac apps, the Mac App Store review team always rejects them. I have apps that have been on the store for years that used this code and they verify in the production environment fine but every time I try to send an update it gets rejected. My app does simple receipt validation like this: My app uses the verify receipt endpoint and talks to the server directly (not super secure but that’s okay I don’t need to maintain a server for this app). The verify receipt endpoint always says the receipt is invalid in in the App Review team’s testing environment. My app calls exit(173) after the verify receipt endpoint tells me the receipt is invalid. The systems shows a dialog saying the app is Damaged. I cannot reproduce this in my testing environment nor do I see the issue occurring in the current versions of these apps live on the App Store (no code changes has been made to the receipt validation code). The issue seems to only occur in the App Review team’s testing environment. I've been running into this issue for about a year now. I had a TSI opened last year related to this but the issue never got resolved. I just have to comment out the receipt validation code in every app...then submit my update. Anyone else run into this with verify receipt?
0
0
445
Apr ’23
How to get MPNowPlayingInfoCenter to display the MPNowPlayingInfoPropertyPlaybackProgress value instead of seconds?
I'm trying to configure the "Now Playing" information for my app on iOS. Using MPNowPlayingInfoCenter/MPRemoteCommandCenter is pretty straightforward for this. The issue I'm having is that the audio I'm playing is generated "on the fly" and I do not know the exact duration in seconds. I am able to synthesize an NSProgress to display the progress of the playback but the units are not in seconds. So if I use the NSProgress units with MPNowPlayingInfoCenter the "Now Playing" shows the units in seconds but it appears to be jumpy (because again my progress units are not in seconds but an approximation of the percent completed). [playInfo setObject:@(self.progress.totalUnitCount) forKey:MPMediaItemPropertyPlaybackDuration]; [playInfo setObject:@(self.progress.completedUnitCount) forKey:MPNowPlayingInfoPropertyElapsedPlaybackTime]; I see there is a MPNowPlayingInfoPropertyPlaybackProgress which looks like it would be perfect. I tried setting that instead of MPMediaItemPropertyPlaybackDuration/MPNowPlayingInfoPropertyElapsedPlaybackTime but it appears to have no effect in the "Now Playing" UI. I also tried setting MPNowPlayingInfoPropertyIsLiveStream to YES but that just makes the "Now Playing" UI display "Live" instead of the progress value. Is there a way I can show a progress bar without the units being displayed in seconds? Thanks in advance.
0
0
881
May ’23
Custom UIViewControllerAnimatedTransitioning from UINavigationController when segue is performed from UISearchController's searchResultsController?
I have a custom pop animation is use with UINavigationController. I provide this via the delegate method - -(nullable id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController*)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController*)fromVC toViewController:(UIViewController*)toVC And it works except when I push the view controller initially from UISearchController's .searchResultsController. This issue is that when I push on the navigation stack when the UISearchResultsController is displaying the searchResultsController, when I pop back the UIViewControllerContextTransitioning passed to my animator doesn't provide values to account for the search controller displayed over the main view controller and the custom animation doesn't work. Is there a good way to handle this? Thanks in advance.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
375
May ’23
Useful WWDC Videos Missing from Previous Years (For example: "Customized Loading in WKWebView from WWDC 2017")
It appears a lot of useful WWDC session videos from previous years have been scrubbed from the developer.apple.com? I cannot find the WWDC session "Customized Loading in WKWebView" from 2017 in the Developer app nor on the developer website. There are lots of other videos that would be useful to watch, even from years ago. Am I just not looking in the right place?
0
0
568
Jul ’23
WKContentRuleList Ability To Apply "css-display-none" to an entire style sheet dynamically?
I see in the documentation that it is possible to hide elements on a page using a CSS selector by setting the action type to css-display-none and then providing a selector. But this is kind of limited. You have to know every selector for every style sheet ahead of time. It's possible to block loading of a style sheet using a block rule. "trigger" : { "load-type" : [ "third-party" ], "url-filter" : "REGEX_FOR_STYLESHEET_OF_KNOWN_NASTY_CONTENT_PROVIDER", "resource-type" : [ "style-sheet" ], "url-filter-is-case-sensitive" : true }, "action" : { "type" : "block" } Is is my understanding that the above rule will block loading of a stylesheet that matches the url-filter but all elements will still be displayed by WKWebView using the default style provided by the browser. Am I misunderstanding? Ideally I'd like to be able to set display:none; for every selector in the evil style sheet. I of course can look at the style sheet and make css-display-none rules for every selector manually but that's pretty much impossible to maintain for rule lists with thousands of entires and will break when the author of the nasty stylesheet makes any changes. Is there a way to accomplish what I'm after using WKContentRuleList?
Topic: Safari & Web SubTopic: General Tags:
0
0
501
Jul ’23
How long does WKContentRuleListStore persist compiled WKContentRuleLists?
I see WKContentRuleListStore saves compile lists by identifier. It's nice that I don't have to recompile the WKContentRuleListStore on every app launch but is there ever an event where the system discards compiled lists (other than me calling -removeContentRuleListForIdentifier:completionHandler:)? The reason I ask is should I be writing a version number with my compiled list? If I change the JSON code on an app update do I need to manually remove compiled lists after an app update before recompiling the new JSON?
Topic: Safari & Web SubTopic: General Tags:
0
0
520
Jul ’23
How to set NSCollectionLayoutVisibleItem's name property for use in UICollectionViewCompositionalLayout?
I'm Using UICollectionViewCompositionalLayout with a section provider and I set the NSCollectionLayoutSectionVisibleItemsInvalidationHandler on a particular section. The NSCollectionLayoutSectionVisibleItemsInvalidationHandler hands back an array of objects conforming to the NSCollectionLayoutVisibleItem protocol which has a name property which always appears to be nil. I figured there must be a way to use this name property to make it easier to do look up for the NSCollectionLayoutVisibleItem objects I'm actually looking. Is there a way to make this property nonnil? Does it get set to the UICollectionViewCell's reuse identifier or something (I'm currently using UICollectionViewCellRegistration)? Is there any documentation on the name property? https://developer.apple.com/documentation/uikit/nscollectionlayoutvisibleitem/3199122-name?language=objc
Topic: UI Frameworks SubTopic: UIKit Tags:
0
1
357
Jul ’23
Get UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging like behavior for NSCollectionLayoutItems in UICollectionViewCompositionalLayout?
I have a horizontal section in my compositional layout with three items. 0 ---- 1 ----2 When scrolling toward the center I want the scrolling to snap the item at index 1 to the center of the screen. However I can't figure out how to precisely control horizontal scrolling with compositional layout (it doesn't seem possible to control the contentOffset of horizontal scrolling). When I enable paging using UICollectionLayoutSectionOrthogonalScrollingBehaviorPaging the page size assumes full device width and paging works for the item at index 0 or 2 but then the item at index 1 can never be displayed fully on screen (only one half of its width can be shown at a given time). I tried adding leading and trailing space to the group but that didn't work. When I try the UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging the section is displayed with the item at index 1 centered but scrolling doesn't work. I think what I'm looking for is UICollectionLayoutSectionOrthogonalScrollingBehaviorGroupPaging but at the item level or to be able to adjust the contentOffset on the scroll view at the end of dragging. Is there any way I can programmatically access the scroll view being using for horizontal scrolling? I see in the visibleItemsInvalidationHandler I'm able to get the content offset but I'm not able to change it to support snapping.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
719
Aug ’23
Mac Catalyst with Live Previews: Any Way to Change the Size the View Controller Preview is Rendered at?
I have a Mac Catalyst app. When using "Live Previews" in Xcode 15 for a view controller of mine the live preview renders at a gigantic size in the Preview. This view controller is only ever presented as a "sheet" on Mac at a fixed size so ideally I'd like to be able to specify the "window size" for the preview environment. Is there a way to do this? Thanks in advance.
0
0
493
Sep ’23
Collection View Compositional Layout: uniformAcrossSiblingsWithEstimate Not Working
New in iOS 17 is NSCollectionLayoutDimension uniformAcrossSiblingsWithEstimate: method. I have two collection view items positioned side by side in a a grid and would like to use this feature to give them equal heights. I configure the items like so: -Each "box" in grid is made up of two vertical items -Title item configured with a fractional width of 0.5 and a estimated height. -Description item configured with a fractional width of 0.5 and a estimated height. Then the "box" wraps both the "title item" and a description item vertically NSCollectionLayoutSize *boxSize = [NSCollectionLayoutSize sizeWithFractionalWidth:0.5 estHeightUniformAcrossSiblings:estTitleHeight+estDescriptionheight]]; NSCollectionLayoutGroup *boxGroup = [NSCollectionLayoutGroup verticalGroupWithLayoutSize:boxSize subitems:@[titleItem,descriptionItem]]; //Repeat the box twice to make a side by side grid. //entireRowSize is fractional width of 1.0 and estimated height (not uniform across siblings). NSCollectionLayoutGroup *sideBySideGroup = [NSCollectionLayoutGroup horizontalGroupWithLayoutSize:entireRowSize repeatingSubitem:boxGroup count:2]; But at runtime the grids do not have equal heights. It looks exactly the same as it was on iOS 16. Am I doing something wrong? Thanks in advance.
Topic: UI Frameworks SubTopic: UIKit Tags:
0
0
635
Oct ’23
NSToolbar Draws On Top of "Full Screen" Video Played in WKWebView in Mac Catalyst app
I have a Mac Catalyst app configured like so: The root view controller on the window is a tripe split UISplitViewController. The secondary view controller in the Split View controller is a view controller that uses WKWebView. Load a website in the WKWebview that has a video. Expand the video to “Full screen” (on Mac Catalyst this is only “Full window” because the window does not enter full screen like AppKit apps do). The NSToolbar overlaps the “Full screen video.” On a triple Split View controller only the portions of the toolbar in the secondary and supplementary columns show through (the video actually covers the toolbar area in the “primary” column). The expected results: -For the video to cover the entire window including the NSToolbar. Actual results: The NSToolbar draw on top of the video. -- Anyone know of a workaround? I filed FB13229032
0
0
633
Oct ’23
AVAudioMixerNode outputVolume range?
According to the header file the outputVolume properties supported range is 0.0-1.0: /*! @property outputVolume @abstract The mixer's output volume. @discussion This accesses the mixer's output volume (0.0-1.0, inclusive). @property (nonatomic) float outputVolume; However when setting the volume to 2.0 the audio does indeed play louder. Is the header file out of date and if so, what is the supported range for outputVolume? Thanks
0
0
78
Apr ’25
Exposing Objective-C API to Swift inside a Framework (Private Framework API)
My framework has private Objective-C API that is only used within the framework. It should not be exposed in the public interface (so it shouldn't be imported in the umbrella header). To expose this API to Swift that's within the framework only the documentation seems to indicate that this needs to be imported in the umbrella header? Import Code Within a Framework Target To use the Objective-C declarations in files in the same framework target as your Swift code, configure an umbrella header as follows: 1.Under Build Settings, in Packaging, make sure the Defines Module setting for the framework target is set to Yes. 2.In the umbrella header, import every Objective-C header you want to expose to Swift. Swift sees every header you expose publicly in your umbrella header. The contents of the Objective-C files in that framework are automatically available from any Swift file within that framework target, with no import statements. Use classes and other declarations from your Objective-C code with the same Swift syntax you use for system classes. I would imagine that there must be a way to do this?
0
0
305
Jul ’25