Posts

Post not yet marked as solved
2 Replies
245 Views
Ok, weird one here. I have a widgetkit watch extension that I'm transitioning to. All code compiles clean, but when I go to install I get an error that it can't be installed on the watch because the extension does not define either a NSExtensionMainStoryboard or an NSExtensionPrincipalClass key. I don't have a storyboard for the extension as it's for the complications, so I added a principal class key. Now it won't install with the error that it defines a principal class which is not allowed for the extension point com.apple.widgetkit-extension. Huh. Well, ok, um... I guess I'll rip it out and stay with the deprecated clock kit complications, since they at least install. But this is very frustrating, and makes me think Apple wants us to go insane!
Posted
by Attila.
Last updated
.
Post not yet marked as solved
1 Replies
473 Views
I've upgraded to Xcode 14 and the suggested changes to the project included making the WatchKit app and the extension be a single target. Once I did that, my complications and my old extension code can't find the objective-c objects that I had included via a bridging header. I've gone looking in the watch app settings and there is no option for setting the bridging header. None that I can find, I should say. There is no Swift Compiler section at all, and I can't seem to add a user-defined setting either. Now the app won't compile. If I restore from time machine and try again, then I can't install the app because Xcode tells me that an extensionless WatchKit app has an extension, which of course it does! So how do I add the bridging header to the WatchKit app?
Posted
by Attila.
Last updated
.
Post not yet marked as solved
1 Replies
648 Views
I tried to build my app with Xcode 15 and as part of that I changed the current project version and marketing version in the main app, but when I went to the various intent and watch extensions, the option to change the versions weren't there. I thought "hmm maybe Apple has gotten smart and just made those follow the main app" but I was wrong. The settings are still there but there is no UI to change them, and compiling now shows warnings about mismatched versions. When I go into Build Settings and look for Versions, I can find the wrong values and change them there, but this is very laborious. Deleting the settings sets them to the default project versions, but there is no UI to set these either so nothing is changed and warnings still appear. So for now I'm stuck with manually going to each build setting page and changing the versions there. Sigh. I think I'll file a bug report, this can't be right.
Posted
by Attila.
Last updated
.
Post marked as solved
2 Replies
2.1k Views
I have a watch complication that used to work just fine and now all of a sudden in my latest build it's showing only dashes. The watch app is there, if I tap on the complication then the watch app opens correctly, if I edit the watch face and select the complication I can see my placeholder (and it's fine) but when I select that complication, the sample watch face shows dashes. The only major change I've made is to make the watch app a single-target without an extension delegate as per Apple's recommended settings. I don't think this is the problem as the simulator shows the complication. It's only on the Watch Series 4 that I'm testing on that I can't see my complication. It was working only last week and I have not touched the complication code at all, so I'm stumped as to what's wrong. I can't find any help on line, apparently no one has ever seen the complication just have dashes. When I debug the watch app and ask for how many complications there are, it comes back with zero even though I've put them on the watch face. It seems like watchOS9 is just not respecting the complication any longer but I can't figure out why. Please note that I'm not using WidgetKit complications as the corner complication doesn't flow the text in an arc like ClockKit does, so I'm still using the old complications. But none of the code is getting called as none of my breakpoints are firing. I've rebooted the watch about 10 times and the problem persists. Any ideas why all of a sudden this has fallen over and gone boom?
Posted
by Attila.
Last updated
.
Post not yet marked as solved
0 Replies
819 Views
Hello! If you see this post on stackoverflow, it's because I posted in both places. I have an app that I'm doing receipt validation via the validateReceipt endpoint (for iOS15) and the new StoreKit2 AppTransaction for iOS16. All is well until... A user reported that the app keeps telling him that there is no app receipt to validate and wants him to sign in and get a new receipt. Trouble is, his iPad is under device management from Mosyle and he doesn't have the account ID or password to sign in with. Well duh, of course not, that's handled by IT. My understanding is that the receipt is tied to the user account and the device that the app is on, so if the app is being distributed from a server then the receipt won't match the device, or possibly isn't even part of the distribution. I'm unclear on this, as all I'm getting is an alert about the receipt. I'm adding more code to detect and report on what might be happening inside the app, but in the meanwhile I have to figure out what to do to get rid of the warning prompt. My questions, after having read volumes of unhelpful information about MDM's, are simple. Is there a way to detect inside the app if the app was installed via an MDM? Can I tell from inside the app if the device is registered in an MDM? And how can I tell that the app is authorized to run on the device if the receipt validation methods aren't, well, valid? I have tried multiple combinations of search terms yet nowhere can I find out how to detect a valid MDM configuration and thus not look at the receipt. It seems the answer is either that developers aren't checking their receipt or that the solution is so blazingly simple that I'm just not seeing it.
Posted
by Attila.
Last updated
.
Post not yet marked as solved
2 Replies
868 Views
I have a weird problem with App Review. My iPad app, which has been in the store for years and regularly updated, needs another update to address a corrupt database issue. I'm on Xcode 14.0.1 and Mac OS 12.6. App compiles fine, nothing is wrong. But when I submitted it, App Review rejected it because of internal references to iPad OS 16. These references apparently come from Xcode 14.0.1. I can't remove them, it's Apple's code! I don't include any objects, functions, or references to iPad OS 16 in my code. I target iPad OS 14.0 and above. I don't even have the beta installed on any device, yet because Xcode has it, my update is rejected Am I supposed to install an older version of Xcode just for this one app? Why would Apple release developer software that can't be used, and call it the release version? And why is it that small developers like me always seem to get the short end of the stick when Apple starts marching around wrecking things? This situation is ridiculous and I'm frustrated.
Posted
by Attila.
Last updated
.
Post not yet marked as solved
1 Replies
600 Views
I've created a WatchKit app for my iPhone app. I'm using Xcode 12.1 and have followed the templates for creating the WatchKit app. When I run it in the simulator by directly installing it to the watch simulator, it runs. When I install it on my Series 4 watch running watchOS 6.2 from the iPhone running iOS 13.7, the Watch app crashes after installing it, and crashes immediately thereafter until I delete the app from the watch. The WatchKit app still runs, BTW. It's the Watch.app on the iPhone that is crashing. Being on the iPhone, I got no crash report so I recreated this exact configuration in the simulator. Set up the iPhone 8, paired it with the watch, started both, installed my app on the iPhone, and told the Watch app to install my WatchKit app. It crashed. But this time I got a crash report! I'll skip most of it, but here's the good part: Crashed Thread: 13 Dispatch queue: com.apple.ntk.companionremotecomplicationmanager.updates Exception Type: EXC CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC CORPSE NOTIFY Application Specific Information: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSBundle initWithURL:]: nil URL argument' terminating with uncaught exception of type NSException abort() called CoreSimulator 732.18 - Device: iPhone 8 Plus 13.7 + W (8414342A-C2FD-4B5E-95AD-BEDB187E121B) - Runtime: iOS 13.7 (17H22) - DeviceType: iPhone 8 Plus From this I believe there is a URL missing from the WatchKit app bundle that Bridge.app needs to find. Trouble is, there's nothing in the documentation about needing a URL and no place I can find to put one anyway. Curiously, the crash mentions a thread named remotecomplicationmanager, but I haven't implemented any complications in the watch app yet (it's on the list) so I'm wondering if the problem is that the Bridge.app expects all WatchKit apps to have complications, and doesn't know what to if there aren't any? I'm also wondering if this might be the cause of some trouble reports about Watch.app crashing on other people's phones, with other WatchKit apps, that I found doing a Google search.
Posted
by Attila.
Last updated
.