Post

Replies

Boosts

Views

Activity

Mirroring Workouts Sample Code Doesn't Work With Simulators
I've realised with the sample code from the WWDC video below I'm getting the following error when trying to use the iPhone simulator and apple watch simulator paired. Whenever i try to test out the sample project I'm getting the following error. Failed to send data: Error Domain=com.apple.healthkit Code=300 "Remote device is unreachable" UserInfo={NSLocalizedDescription=Remote device is unreachable, NSUnderlyingError=0x600000c9c900 {Error Domain=RPErrorDomain Code=-6727 "kNotFoundErr ('rapport:rdid:PairedCompanion' not found)" UserInfo={cuErrorDesc=kNotFoundErr ('rapport:rdid:PairedCompanion' not found), cuErrorMsg='rapport:rdid:PairedCompanion' not found, NSLocalizedDescription=kNotFoundErr ('rapport:rdid:PairedCompanion' not found)}}} Is it not possible to not test out the new WorkoutKit mirroring API's using the simulator? Currently right now if you run the project you'll notice that you can start a workout session on the iPhone > Apple Watch but there is no way to control and mirror on both devices at the moment i.e You can't control the iPhone app on the Apple Watch and vice versa. Also because of this the iPhone can't send data to the Apple Watch i.e. pause, end, water etc. I'm guessing this is meant to be possible since it seems a bit strange to only be able to test this out with actual devices. WWDC Session https://developer.apple.com/wwdc23/10023 Sample Code https://developer.apple.com/documentation/healthkit/workouts_and_activity_rings/building_a_multidevice_workout_app
2
0
219
Oct ’24
StoreKit2 Unable To Fetch Consumables In TestFlight or App Review
Currently, there seems to be an issue with the Product API when requesting products with an array I don't get an error instead in the console when testing with a sandbox box account I get the following warning. [StoreKit] Did not receive any products or error for products request. Something that's strange which leaves me to believe this may be an internal issue at Apple. Is that if you set up the Xcode project with a StoreKit Configuration file. The products are retrieved just fine and you can mock/test out consumables locally and simulate purchasing great. The issue seems to happen when you're either trying to test via Testflight or if you're trying to use a sandbox account. Something i've tripled check to make sure i've setup the products properly in AppStoreConnect are: Accepted the latest banking agreements and added bank info Made sure that my in-app purchases have a status of "Ready to Submit" at a bare minimum (They have a price & all the relevant info filled in) Made sure the bundle identifiers are all correct and matching Validate the API with the storekit configuration file which it does Added In App Purchase Capability Please can someone at Apple investigate this since I'm unable to get past an app submission due to the reviewer not being able to see these products even though I can locally with the storekit configuration file which is pretty frustrating. I’m using iOS16.1.1 & Xcode 14.0.1
1
0
1.2k
Jan ’23
Apple On Demand seems to fail for App Reviewers
Got a really weird dilemma. Basically one of our Apps we've been trying to submit this for a while now and it keeps on getting rejected because the reviewers test device is failing to download the assets from Apple On Demand, this is really frustrating since this is something that is out of our control and we can not control the delivery of these assets from Apple's servers. Below is a snippet of the code we are using to request Assets from the server.         let req = NSBundleResourceRequest(tags: [tag])         requests[tag] = req         req.conditionallyBeginAccessingResources { isDownloaded in             guard !isDownloaded                 else { return update(.success(Demand(id: tag, status: .ready))) }                 req.beginAccessingResources { error in                     if let error = error {                         update(.failure(error))                     } else {                         update(.success(Demand(id: tag, status: .ready)))                     }                 }         } We seem to be hitting line 21 where the asset is failing to download which is something out of our control. I would really appreciate if anyone has come across this issue or if one of the Apple Engineers can look at this and provide support.
1
0
636
Jan ’21
Compositional Layout Header Memory Leak
I seem to be experiencing a memory leak with compositional layout where my group size is causing my header and cells to experience extremely high memory usage. Just to explain in more detail I'm trying to layout a horizontal grid where items have a 1:1 ratio based on the width of the screen. In my case I want 5 items per row which are 20% of the screen size with 1px spacing in between each item. And the height of the headers should be estimated so they are self sizing based on their content. So below is a snippet of what I have so far below. &#9;&#9;// MARK: Sizing Constants &#9;&#9;private let itemRatio: CGFloat = 0.2 &#9;&#9; &#9;&#9;var layout: UICollectionViewCompositionalLayout { &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;UICollectionViewCompositionalLayout { [weak self] (sectionIndex, _) -> NSCollectionLayoutSection? in &#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;guard let self = self else { return nil } &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;let item = NSCollectionLayoutItem(layoutSize: .init(widthDimension: .fractionalWidth(self.itemRatio), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;heightDimension: .fractionalWidth(self.itemRatio))) &#9;&#9;&#9;&#9;&#9;&#9;item.contentInsets.trailing = 1 &#9;&#9;&#9;&#9;&#9;&#9;item.contentInsets.bottom = 1 &#9;&#9;&#9;&#9;&#9;&#9;let group = NSCollectionLayoutGroup.horizontal(layoutSize: .init(widthDimension: .fractionalWidth(1), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; heightDimension: .fractionalWidth(self.itemRatio)), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; subitems: [item]) &#9;&#9;&#9;&#9;&#9;&#9;let section = NSCollectionLayoutSection(group: group) &#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;// Enable this when finish working on the cells &#9;&#9;&#9;&#9;&#9;&#9;section.boundarySupplementaryItems = [ &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;.init(layoutSize: .init(widthDimension: .fractionalWidth(1), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;heightDimension: .estimated(38)), // Investigate why this is causing a memory leak... &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;elementKind: "CollectionViewHeader", &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;alignment: .topLeading) &#9;&#9;&#9;&#9;&#9;&#9;] &#9;&#9;&#9;&#9;&#9;&#9;return section &#9;&#9;&#9;&#9;} &#9;&#9;} If I change the following code above to this below where I define an absolute value for the section header, everything renders fine and there are no issues. &#9;&#9;&#9;&#9;// MARK: Sizing Constants &#9;&#9;&#9;&#9;private let itemRatio: CGFloat = 0.2 &#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;var layout: UICollectionViewCompositionalLayout { &#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;UICollectionViewCompositionalLayout { [weak self] (sectionIndex, _) -> NSCollectionLayoutSection? in &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;guard let self = self else { return nil } &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let item = NSCollectionLayoutItem(layoutSize: .init(widthDimension: .fractionalWidth(self.itemRatio), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;heightDimension: .fractionalWidth(self.itemRatio))) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;item.contentInsets.trailing = 1 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;item.contentInsets.bottom = 1 &#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let group = NSCollectionLayoutGroup.horizontal(layoutSize: .init(widthDimension: .fractionalWidth(1), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; heightDimension: .fractionalWidth(self.itemRatio)), &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; subitems: [item]) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;let section = NSCollectionLayoutSection(group: group) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;// Enable this when finish working on the cells &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;section.boundarySupplementaryItems = [ &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;.init(layoutSize: .init(widthDimension: .fractionalWidth(1), &#9;&#9;//&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;heightDimension: .estimated(38)), // Investigate why this is causing a memory leak... &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;heightDimension: .absolute(sectionIndex < 1 ? 120 : 72)), // Investigate why this is causing a memory leak... &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;elementKind: "CollectionViewHeader", &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;alignment: .topLeading) &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;] &#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;return section &#9;&#9;&#9;&#9;&#9;&#9;} &#9;&#9;&#9;&#9;} Any ideas why this might be the case?
0
0
1.2k
Aug ’20
Health Records entitlement automatically being added.
We seem to be dealing with a weird issue where the clinical health records entitlement keeps on getting added into our final embedded.mobileprovision when we prepare a build for distribution. We seem to get this in the final package. &lt;key&gt;com.apple.developer.healthkit.access&lt;/key&gt; &lt;array&gt; &lt;string&gt;health-records&lt;/string&gt; &lt;/array&gt; But in our projects entitlement file there is no reference to health records. Below is the raw values inside of this file. &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt; &lt;plist version="1.0"&gt; &lt;dict&gt; &lt;key&gt;aps-environment&lt;/key&gt; &lt;string&gt;development&lt;/string&gt; &lt;key&gt;com.apple.developer.healthkit&lt;/key&gt; &lt;true/&gt; &lt;key&gt;com.apple.developer.healthkit.access&lt;/key&gt; &lt;array/&gt; &lt;key&gt;com.apple.security.application-groups&lt;/key&gt; &lt;array&gt; &lt;string&gt;group.xxxxx&lt;/string&gt; &lt;/array&gt; &lt;/dict&gt; &lt;/plist&gt; And also in the project this isn't selected in the capabilities section either. Has anyone come across this issue before where Xcode automatically adds clinical records even though you haven't selected the checkbox.
3
0
1.5k
Jul ’20