Post

Replies

Boosts

Views

Activity

SwiftUI binding dynamic array problem
I have an editor view that's broken up into several subviews. The model is a relatively small struct, but it does have a couple properties that can be variable-length arrays.The problem I'm having is after I add one entry to any one of these arrays, the view stops updating:struct ChecksView: View { @Binding var checks: [Check] var body: some View { HStack(alignment: .top, spacing: 0) { Button("add prereq", action: { self.checks.append(Check()) }) VStack { ForEach(self.checks.indices, id: \.self) { i in CheckView(check: self.$checks[i]) } } } } }In this subview, the first time you tap "add prereq", it will add to the array & update the UI. But every subsquent time, nothing updates until you navigate away & return. What am I doing wrong?
6
0
7.9k
May ’20
App rejected because of invalid LSMinimumSystemVersion
The rejection states:The key LSMinimumSystemVersion in the Info.plist file has the value '$minimumSystemVersion', which is invalid. This string indicates the minimum version of macOS required for this application to run and must be of the form n.n.n where n is a number. For more information, see the Information Property List Key Reference.But the key's not even present in my Info.plist, nor is the string '$minimumSystemVersion'
4
0
3.5k
Sep ’18
Can't add localized info to our app
When we try to add localized info (what's new, description, etc.) we get a whole bunch of errors: Japanese The app name you entered is already being used for another app in your account. If you would like to use the name for this app you will need to submit an update to your other app to change the name, or remove it from App Store Connect. Japanese Description couldn’t be saved because another field in this localization is invalid. Japanese Keywords couldn’t be saved because another field in this localization is invalid. Japanese Marketing URL couldn’t be saved because another field in this localization is invalid. Japanese Promotional Text couldn’t be saved because another field in this localization is invalid. Japanese Support URL couldn’t be saved because another field in this localization is invalid. Japanese What's New in This Version couldn’t be saved because another field in this localization is invalid. We have 2 versions of the app on the store, iOS & macOS. Both have the same name, because they're the same app. They predate the ability to add Universal versions of iOS/macOS apps. Could this be the cause of the error? We really don't want to have to change the name of either of them.
3
0
4.0k
Oct ’20
"an error occurred trying to capture leaks data"
When I try to run my iOS app through the Leaks instrument in the simulator, very shortly after launch, without fail, it will stop with the error "An error occurred trying to capture Leaks data"All the disclosure says is "Error retrieving leak information." I can't find any other information. Checking the console view, it just shows a normal run up until "<End of Run>"I've tried doing a clean build, deleting my derived data, uninstalling the app from the simulator, restarting Xcode, rebooting. I have no idea what to do.
28
0
19k
Apr ’19
"sign in to use this application on this computer" but can't change apple ID
I'm trying to test IAP in my Mac App Store app before submitting an update, but even after deleting every single trace of the installed app I can find, it shows the "sign in to use this application on this computer" prompt with the Apple ID filled and greyed out so I can't change the sandbox user account.I've searched high and low and can't find any comprehensive information about testing with sandbox accounts on macOS, much less anything about this specifically. What can I do?
1
0
997
Nov ’19
WatchKit companion app: No PluginKit or application proxy available
I cannot figure out for the life of me how to get a working WatchKit companion app. I have an existing test iOS app. I've added the "Watch app for iOS app" targets. Verified that the bundle identifiers were set up correctly according to various tutorials. I'm able to start the WCSession on the phone, and have the corresponding WCSession code in my InterfaceController's -awakeWithContext: method. But when I try to start a workout session from the phone: HKWorkoutConfiguration *configuration = [[HKWorkoutConfiguration alloc] init]; configuration.activityType = HKWorkoutActivityTypeFitnessGaming; configuration.locationType = HKWorkoutSessionLocationTypeIndoor; [self.healthStore startWatchAppWithWorkoutConfiguration:configuration completion:^(BOOL success, NSError * _Nullable error) { if (success) { NSLog(@"success"); } else { NSLog(@"failed to start watch app: %@", error); } }]; I get this error: failed to start watch app: Error Domain=com.apple.healthkit Code=550 "No PluginKit or application proxy available for com.beliefengine.healthkit.watchkitapp.watchkitextension" UserInfo={NSLocalizedDescription=No PluginKit or application proxy available for com.beliefengine.healthkit.watchkitapp.watchkitextension} I can't find anything about this particular error anywhere. And I have no idea how to troubleshoot it.
2
0
1.4k
Feb ’21
How do you actually test "Ask to buy"?
I'm aware of simulatesAskToBuyInSandbox, and that first part seems to work well enough, but I'm at a loss as to what to do after that – I know there's no way to test the parent's side of that (since there's no way to set up a family relationship with sandbox accounts). The part I'm stuck on is testing the app's response to the approval / denial of the purchase, and I can't find any information on how to trigger that, if it's even possible. Is it actually necessary to test in the live environment, with real money?
0
0
493
Jan ’21
Can't login to sandbox account
I've created a bunch of sandbox accounts at this point, and it's getting pretty frustrating. I'm not sure what I'm doing wrong.When my app launches, it shows theSign-in RequiredEnter the password for .[Environment: Sandbox]prompt. But even if I enter the *exact* same password I just used to create a sandbox account, and signed into Settings with, I keep gettingVerification Failed.Your Apple ID or password is incorrect.
8
1
15k
Feb ’19
iOS file tags API?
With the introduction of the Files app, it seems like file tags are finally supported on iOS. But I've been searching and I can't seem to find an API for it. NSURL's getResourceValue:forKey:error: doesn't accept NSURLTagNamesKey, stating that it's unavailable on iOS. Is there another way?
2
1
944
Sep ’17
How to get crash reports from build uploaded with Transporter?
It seems the only way to get crash reports is via the Xcode organizer, now. I can't find anything in App Store Connect anymore. How do you get crash reports for builds that were uploaded with Transporter? Alternatively, how do you get a build from Transporter over to the Xcode organizer? There doesn't seem to be a way to add a build to the organizer.
0
0
368
Oct ’20
troubleshooting SwiftUI crashes
I'm just starting out with SwiftUI (for macOS) and am running into all sorts of problems, mostly related to resizing the application window.I'm seeing two distinct crashes in my app, but I can't figure out how to troubleshoot them.One is incredibly vague:*** Assertion failure in -[_TtC7SwiftUIP33_A874FC5B9DB530D4375C25AE2AA39DF215HostingClipView setBoundsOrigin:], /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.40.150/AppKit.subproj/NSView.m:5646this'll happen randomly when resizing the window, but there's nothing else to go on.The other is:It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out. If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug. This will be logged only once. This may break in the future.Which gives me a tip, but once I actually figured out how to set that breakpoint, I still really have no idea what to do. The stack trace for either really doesn't do me any good.
2
0
2.6k
May ’20
How do you specify the cloud container in a provisioning profile?
I want to share a container across an iOS and a macOS app. Problem is, when I specify the shared container in my app's entitlements file, which I have set up in the app identifier, I get this error when selecting a provisioning profile: Provisioning profile "..." doesn't match the entitlements file's value for the com.apple.developer.ubiquity-kvstore-identifier entitlement. I've created the provisioning profile manually, but I can't find any way to edit any of its settings.
0
0
542
Aug ’20