Post

Replies

Boosts

Views

Activity

Widget Refresh through Silent Push Notification
I am trying to refresh my widget through Silent Push Notifications. I have the background value as well as content-value = 1. However 99% of the time if the app is in the background or has been fully terminated/exited, the silent push notification won't start the app. I also tried logging the method that runs when the notification is received and it seems like it only gets called once the app is re-launched manually. Do I need to do anything to get it to get my widget to refresh when some events happen on the backend? Android is really smooth when it comes to implementing similar logic.
0
0
562
Jul ’23
Post Testflight Execution in Xcode Cloud
Is there a way to execute code after the app has been uploaded successfully to Testflight? I am trying to post the patch notes of the update into Slack. I would be fine if there is a way to put the patch notes into the "What's New" section for the app in Testflight instead. The current Slack integration seems to show the Git title rather than the title/summary + the description. I would love to use either the last commit's description or a separate file in my repo to host all the changes.
0
0
497
Jun ’22
UICollectionView orthogonalScrollingBehavior groupPagingCentered wrong behavior
So I have a collection view with the following layout private static func createChannelsCompositionalLayout() -> UICollectionViewLayout { let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .fractionalHeight(0.45)) let item = NSCollectionLayoutItem(layoutSize: itemSize) item.contentInsets.top = 5 item.contentInsets.bottom = 5 let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(0.87), heightDimension: .fractionalHeight(1)) let group = NSCollectionLayoutGroup.vertical(layoutSize: groupSize, subitem: item, count: 2) group.contentInsets.trailing = 10 group.contentInsets.leading = 10 group.contentInsets.bottom = 10 let section = NSCollectionLayoutSection(group: group) section.orthogonalScrollingBehavior = .groupPagingCentered let layout = UICollectionViewCompositionalLayout(section: section) return layout } Basically it scrolls horizontally with two items displayed vertically per group. It works fine if the number of items is even; however if the number of items is odd, when you scroll to the last group (which would contain 1 item instead of 2), it wouldn't snap perfectly like it does with 2 items. It will be closer to the screen's edge and a bigger portion of the second to last group will be shown which is not desirable. Is that a bug or is there something I could change in my code? I tried playing a little bit with the insets and fractions but no joy. I also tried adding a contentInset to the section but that didn't help either.
0
0
438
Apr ’22
Xcode SPM when switching between branches
I have this problem with Xcode and SPM where every time I open up my Xcode project or switch branches, Xcode would spend a lot of time resolving the dependencies. I don't remember that that was a thing with Cocoapods. Is there a way to prevent it from doing this? It slows down my machine and make it completely unusable for 5-15 mins so switch branches is always a pain. EDIT: I would like to add that I have the Package.resolved file ignored under Git.
10
14
5.4k
Nov ’21
Marketplace for a physical product
Hello, I am working on an app that enables users to control a physical product that they buy. We are planning on launching a feature that lets users pay a monthly/yearly subscription fee in order to let them use our marketplace that hosts automations to the physical product that developers can use to make cool things for the physical product as well as earn some money. I looked at the App Store Guidelines since I am not sure if this should be an IAP or if it should be handled through our own marketplace. However after reading these guidelines I am inclined to believe that this feature should not be an IAP: .3(e) Goods and Services Outside of the App: If your app enables people to purchase physical goods or services that will be consumed outside of the app, you must use purchase methods other than in-app purchase to collect those payments, such as Apple Pay or traditional credit card entry. .4 Hardware-Specific Content: In limited circumstances, such as when features are dependent upon specific hardware to function, the app may unlock that functionality without using in-app purchase (e.g. an astronomy app that adds features when synced with a telescope). App features that work in combination with an approved physical product (such as a toy) on an optional basis may unlock functionality without using in-app purchase, provided that an in-app purchase option is available as well. You may not, however, require users to purchase unrelated products or engage in advertising or marketing activities to unlock app functionality. But judging by how Apple has handled other cases before and how the guidelines have some grey areas, I would love to have a second opinion. Thanks!
0
0
442
Mar ’21