I'm currently working on a SwiftUI subscription manager app and getting ready to launch my first TestFlight beta soon. Things are going well so far, the only thing I'm having trouble figuring out is how to schedule notifications based on a subscription start date, as well as calculating the next renewal date.
Upon adding a subscription, the user will be able to specify a start date, whether it renews weekly, monthly or annually as well as when the notification should be sent. The user can choose between being notified on day of renewal to 7 days before renewal.
I also need a way to calculate the date of next renewal. The next renewal date will not be stored, only the start date. I've been thinking to solve this by getting the next trigger date of the notification, as well as accounting for how many days before renewal.
It would be really appreciated if someone knows the solution to this problem.
Post
Replies
Boosts
Views
Activity
I’m trying to access the TestFlight public links forum mentioned here but it is saying page not found. Is the forum not available yet or something?
CloudKit was working perfectly in iOS 16. However after updating to iOS 17 RC on my devices iCloud sync no longer works properly.
The app has a package called CloudKitSyncMonitor which shows the sync status. Normally it would say Synced with iCloud but on iOS 17 it is either stuck in the Syncing or Sync not started state and the data doesn’t update. This mostly happens after a reinstall of the app. After some time it randomly decides to work until I uninstall the app.
I’m really confused what could be the problem if it was working fine on iOS 16 but barely works properly on iOS 17? This is currently the code I have for the DataController:
import SwiftUI
import CoreData
class DataController {
var container: NSPersistentCloudKitContainer
@AppStorage(wrappedValue:true,"syncEnabled",store:UserDefaults(suiteName: "group.com.ip18.SubManager")) var syncEnabled
static let shared = DataController()
init() {
container = NSPersistentCloudKitContainer(name: "Subscriptions")
load(syncEnabled: syncEnabled)
}
func load(syncEnabled: Bool = true) {
container = NSPersistentCloudKitContainer(name: "Subscriptions")
let url = URL.storeURL(for: "group.com.ip18.SubManager", databaseName: "Subscriptions")
let storeDescription = NSPersistentStoreDescription(url:url)
if syncEnabled {
storeDescription.cloudKitContainerOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: "iCloud.com.ip18.SubManager")
} else {
storeDescription.cloudKitContainerOptions = nil
}
let remoteChangeKey = "NSPersistentStoreRemoteChangeNotificationOptionKey"
storeDescription.setOption(true as NSNumber, forKey: remoteChangeKey)
storeDescription.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey)
container.persistentStoreDescriptions = [storeDescription]
container.viewContext.automaticallyMergesChangesFromParent = true
/*
// Only initialize the schema when building the app with the
// Debug build configuration.
#if DEBUG
do {
// Use the container to initialize the development schema.
try container.initializeCloudKitSchema(options: [])
} catch {
// Handle any errors.
}
#endif
*/
container.loadPersistentStores(completionHandler: {(storeDescription,error) in
if let error = error as NSError? {
fatalError("Unresolved error \(error)")
}
})
}
}
I have ported my app to visionOS but have not been able to get alternate app icons working using UIApplication.shared.setAlternateIconName. I remember many months ago when I ran the iPad app directly, changing the app icon worked but I never managed to get it to work for native visionOS apps. Is this not supported for apps compiled natively for visionOS?
I am trying to set the background colour of my app shortcut platter for the visionOS version using NSAppIconComplementingColorNames but it doesn’t take effect when I check the shortcuts app. I see the built in Music Recognition app has a background colour but I am unable to set one for my app. Please note that this feature is working correctly on iOS. But on visionOS it has no effect and returns a plain background.
I am using Xcode 15.3 beta 2 and running the visionOS 1.1 simulator.
Sample code from Info.plist:
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>NSAppIconComplementingColorNames</key>
<array>
<string>SMGreen</string>
<string>DarkGreen</string>
</array>
</dict>
</dict>
Feedback ID: FB13595442
If an app contains app intents and built using the visionOS 1.1 SDK, and the app is either run on the visionOS 1.0 simulator or a visionOS 1.0 device the app instantly crashes on launch with a missing symbol error. This doesn’t happen with apps built using the visionOS 1.0 SDK.
Below is a screenshot of a crash report sent by TestFlight review:
Feedback ID: FB13666685
I have a native SwiftUI Mac app which is based off my iOS app and includes Core Data with iCloud sync. As per my understanding, when a user makes a change on one of the devices a remote notification is sent to the others. I have a widget which displays information from Core Data and the remote notification makes the widget update its information on the next timeline refresh without the user having to open the app manually.
My question is, if an app is closed on macOS so it's not even running in the Dock, do remote notifications work? This page says "the delegate receives this message when the application is running and a remote notification arrives for it". Does that mean the app won't receive remote CloudKit notifications when closed on macOS?
This is a follow up to my previous post, this time using the visionOS 1.2 simulator and Xcode 15.4.
I am trying to set the background colour of my app shortcut platter for the visionOS version using NSAppIconComplementingColorNames but it doesn’t take effect when I check the shortcuts app. I see the built in Music Recognition app has a background colour but I am unable to set one for my app. Please note that this feature is working correctly on iOS. But on visionOS it has no effect and returns a plain background.
I noticed the documentation doesn't mention it works on visionOS. But if that's the case how was the music recognition app able to set a colour?
On Xcode 15.4, LAContext.biometryType had an @available attribute of visionOS 1.0. However, in Xcode 16, the @available attribute for biometryType was changed to a visionOS 2.0 minimum requirement, preventing the app from building if the minimum deployment target is earlier than visionOS 2.0.
This was the attribute on Xcode 15.4:
This is the attribute on Xcode 16:
Feedback ID: FB13824190
Before I launched my app, I ran a TestFlight beta program and also included a one time purchase in the TestFlight build to test the functionality.
Now that the app is available in the App Store, I had closed the TestFlight program, but am looking to reopen it again to test iOS 18 specific features. The issue is, the beta testers that previously purchased the IAP on TestFlight but didn't actually purchase the IAP on the App Store version would be able to use the paid features of the app for free as long as they have the TestFlight build. Therefore I would like to revoke all the purchases made via the TestFlight build.
Is there any way to do that?
I used to be able to show my app's icon in the UI using this code:
if let icon = UIImage(named: "AppIcon") {
Image(uiImage: icon)
.resizable()
.frame(width: 64, height: 64)
.cornerRadius(10)
}
But this doesn't work when building with Xcode 16 and iOS 18 SDK.
How can I show my app's icon in the UI without resorting to duplicating the asset?
In iOS 18, internal extension pages cannot navigate to external webpages, either via href links or through JS methods such as window.location.replace. Nothing happens when you try to navigate to an external webpage. Only other internal pages can be navigated to. This wasn't an issue on previous versions of iOS.
It would be appreciated if this can be fixed as soon as possible.
Feedback ID: FB14194963
I am seeing blank data after 4am when viewing the last 24 hours graph. I remember a while ago it showed me data past 4am but now the graph is suddenly showing no data after 4am.
Are there any issues with the data shown on sales and trends at the moment?
On both the iOS 18 beta 3 and iPadOS 18 beta 3 simulators, the customise button in home screen edit mode does nothing. I can check the dark mode icons by toggling the system appearance, but as the customise menu doesn’t work there is no way to check the tinted icons on the simulator.
Feedback ID: FB14422030
I'm trying to disable Writing Tools for a specific TextField using .writingToolsBehavior(.disabled), but when running the app on my iPhone 16 Pro with Apple Intelligence enabled, I can still use Writing Tools on the text box. I also see no difference with .writingToolsBehavior(.limited).
Is there something I'm doing wrong or is this a bug?
Sample code below:
import SwiftUI
struct ContentView: View {
@State var text = ""
var body: some View {
VStack {
TextField("Enter Text", text: $text)
.writingToolsBehavior(.disabled)
}
.padding()
}
}
#Preview {
ContentView()
}