I am running Xcode 14.2 and attempting to test on a developer-signed physical device (iOS 16.1.2).
Following the steps in Apple documentation ("Setting up StoreKit Testing in Xcode"), I have been able to run tests using using local StoreKit configuration file. All works well.
I next wanted to try to use Sandbox Testing. Following the same documentation,
I set up a Sandbox Tester in Apple Store Connect.
I saved a Public Certificate from the storekit configuration file in the project.
I removed the local StoreKit configuration file from the scheme’s run options (by setting to "none").
I added the following conditional compilation block to my store manager:
let certificate = "StoreKitTestCertificate"
#else
let certificate = "AppleIncRootCertificate"
#endif
It is my understanding that an option to sign in with the SandBox ID should appear in device's App Store Settings after the first time I attempt to make a purchase when running on the device physically connected to my Mac. This is not happening.
Am I missing a step?
One possible mistake I made was placing the (above) conditional compilation block in the wrong place. Can someone recommend the best place for this? The documentation says to paste it in with my receipt validation code.
Another suspected oversight might be something else I need to do in Apple Store Connect. Not sure.
Any help appreciated!
Post
Replies
Boosts
Views
Activity
Hello. I am beta testing an app in TestFlight. I want to use a public database inside the cloudkit container, and I think that I have set things up that way (see below). But my testers can only see their own data and all records are being stored in the Private Database. I'm getting the results I want on my own iPhone (loading the app directly from xCode). But testers are not getting the same experience. It this because I am in TestFlight? Are there settings I have missed? Here is what I have done so far:
In my DataController I have this:
init(inMemory: Bool = false) {
container = NSPersistentCloudKitContainer(name: "Main")
if inMemory { // this is set in static var preview
container.persistentStoreDescriptions.first?.url = URL(fileURLWithPath: "/dev/null")
}
guard let description = container.persistentStoreDescriptions.first else {
print("Can't set description")
fatalError("Error")
}
let publicStoreURL = description.url!.deletingLastPathComponent().appendingPathComponent("public.sqlite")
let containerIdentifier = description.cloudKitContainerOptions!.containerIdentifier
let publicDescription = NSPersistentStoreDescription(url: publicStoreURL)
publicDescription.setOption(true as NSNumber, forKey: NSPersistentHistoryTrackingKey)
publicDescription.setOption(true as NSNumber, forKey: NSPersistentStoreRemoteChangeNotificationPostOptionKey)
let publicOptions = NSPersistentCloudKitContainerOptions(containerIdentifier: containerIdentifier)
publicOptions.databaseScope = .public
publicDescription.cloudKitContainerOptions = publicOptions
container.persistentStoreDescriptions.append(publicDescription)
container.loadPersistentStores { _, error in
if let error = error {
fatalError("Error loading store: \(error.localizedDescription)")
}
}
In entitlements I added "Production" to com.apple.developer.icloud-container-environment (because I read somewhere that that is also needed). In the cloudkit console the container is set to Production as well.
Have I goofed? Or have I neglected something?
Getting desperate ;)
Thanks.
I am running XCode 14.0.1 on mac ios 12.6. When I try to run any app in any simulator I get and alert: "Unable to boot the Simulator. Interrupted System Call."
I have followed steps described in other posts. I've gone to About this Mac > Storage > Manage > Developer and deleted XCode Cache. I've deleted and re-added simulators in XCode itself. I even re-installed XCode. Nothing works.
When I check the "Detail" button in my "Unable to Boot" alert, I also get this:
"Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding Domain: com.apple.SimLaunchHostService.RequestError Code: 4"
Does anyone have any clues as to what is happening?
Thanks
Using xCode 13.4.1, my assets catalog (assets.xcassets) has gone blank. Which is to say when I click on the icon in the left-hand Navigator, the normal OutlineView and DetailView are replaced by a large white area of screen.
If I try, for example, to drag a new image file into this area, it bounces out.
The existing assets are still there; when I run the app the images, etc., appear as expected. I just can't see them to manage them (or add new assets).
I have restarted xCode several times to no avail. Has this ever happened before? Does anyone have a solution?
BTW, in other app projects, the assets catalogs are working normally. It is just in one project where the catalog is "blank"
I have two Core Data entities synching with CloudKit nicely. When I query records for one in the Dashboard, the results are displayed as expected. However, when I query records for the other entity, the Dashboard goes black (completely, I mean, no navigation, etc.). I can confirm that changes to the records are synching across devices. I just can't figure out what is making the Dashboard query fail. Has anyone else encountered the same issue? Was there a solution? (BTW, I have made recordName queryable, since I've had that problem in the past. Also, my app is in development - not production.)