Posts

Post not yet marked as solved
11 Replies
i would also like to know, i'm trying to release an independent watch app with in-app purchases but how do i do that without StoreKit?
Post not yet marked as solved
3 Replies
Is there something that pops up on your watch where you have to press Trust?
Post not yet marked as solved
3 Replies
import SwiftUI struct CardTheme: View { //@State private var theme = 0 @State private var theme = UserDefaults.standard.integer(forKey: "Card Theme") var body: some View { List { HStack { Text("Mono") //.font(.system(size: 12)) .onTapGesture { self.setTheme(i: 0) } Spacer() if(theme == 0) { Image(systemName: "checkmark") .foregroundColor(Color.green) } } HStack { Text("Cool") // .font(.system(size: 12)) .onTapGesture { self.setTheme(i: 1) } Spacer() if(theme == 1) { Image(systemName: "checkmark") .foregroundColor(Color.green) } } HStack { Text("Cute") // .font(.system(size: 12)) .onTapGesture { self.setTheme(i: 2) } Spacer() if(theme == 2) { Image(systemName: "checkmark") .foregroundColor(Color.green) } } } .navigationBarTitle(Text(verbatim: "Card Theme")) } func setTheme(i: Int) { theme = i UserDefaults.standard.set(i, forKey: "Card Theme") } }Sorry I'm having trouble following your code. But if I modified mine to use UserDefaults, i can see that it is correctly saving and retrieving the selection as I can close the app and re-open it and have the correct theme row ticked. The only issue is when I go back to the previous view and re-enter the Card Theme view, it is still showing the same selection as from when the app loaded, rather than any changes in selection since the app loaded. Is there a quick fix for that? For example can I incorporate @EnvironmentObject? Thanks.
Post not yet marked as solved
3 Replies
I've updated to Xcode 11.2.1 and still get this error. The Apple feedback assistant team think it's because my iPhone is not connected to my computer...
Post not yet marked as solved
5 Replies
'GroupedListStyle' is unavailable in watchOS
Post not yet marked as solved
5 Replies
I just tried it in SwiftUI:struct CardOrder: View { @State private var order = 0 var body: some View { Group { List { HStack { Text("Item 0") .font(.system(size: 12)) .onTapGesture { self.setOrder(i: 0) } Spacer() if(order == 0) { Image(systemName: "checkmark") .foregroundColor(Color.green) } } HStack { Text("Item 1") .font(.system(size: 12)) .onTapGesture { self.setOrder(i: 1) } Spacer() if(order == 1) { Image(systemName: "checkmark") .foregroundColor(Color.green) } } HStack { Text("Item 2") .font(.system(size: 12)) .onTapGesture { self.setOrder(i: 2) } Spacer() if(order == 2) { Image(systemName: "checkmark") .foregroundColor(Color.green) } } } } .cornerRadius(12)But it didn't look any different to if I didn't put the List inside the Group.
Post not yet marked as solved
4 Replies
is there any reason why you aren't developing for the latest watchOS? it would be more sensible to take advantage of new frameworks instead of trying to re-invent the wheel for an older OS.
Post not yet marked as solved
17 Replies
Xcode 11.2 just came out but it's still broken. I just tried compiling my Watch app and got this error:Unable to install "[insert app name] WatchKit App"Domain: com.apple.dtdevicekitCode: -402653083--App installation failedDomain: com.apple.dtdevicekitCode: -402653083Failure Reason: Could not connect to the device.User Info: { DVTRadarComponentKey = 487927; "com.apple.dtdevicekit.stacktrace" = ( 0 DTDeviceKitBase 0x000000011bd6c6e7 DTDKCreateNSError + 109 1 DTDeviceKitBase 0x000000011bd6cde9 DTDK_AMDErrorToNSError + 792 2 DTDeviceKitBase 0x000000011bdac56a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164 3 DVTFoundation 0x000000010333e156 DVTInvokeWithStrongOwnership + 73 4 DTDeviceKitBase 0x000000011bdac301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589 5 IDEiOSSupportCore 0x000000011bc34a25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523 6 DVTFoundation 0x000000010346f3ba __DVT_CALLING_CLIENT_BLOCK__ + 7 7 DVTFoundation 0x0000000103470a92 __DVTDispatchAsync_block_invoke + 809 8 libdispatch.dylib 0x00007fff6763f583 _dispatch_call_block_and_release + 12 9 libdispatch.dylib 0x00007fff6764050e _dispatch_client_callout + 8 10 libdispatch.dylib 0x00007fff67645ace _dispatch_lane_serial_drain + 597 11 libdispatch.dylib 0x00007fff67646452 _dispatch_lane_invoke + 363 12 libdispatch.dylib 0x00007fff6764fa9e _dispatch_workloop_worker_thread + 598 13 libsystem_pthread.dylib 0x00007fff6789971b _pthread_wqthread + 290 14 libsystem_pthread.dylib 0x00007fff6789957b start_wqthread + 15);}--
Post not yet marked as solved
4 Replies
i think it's a list style called carousel?
Post not yet marked as solved
2 Replies
I've just done a quick fix/hack to solve all sorts of SwiftUI issues where my view isn't refreshing when I expect it to. Using .rotation3DEffect I do a 360 degree rotation after every action to force the view to do a quick refresh. It has solved my contextMenu issue as well for now. I'm sure this isn't the most elegant solution so hopefully someone else can guide us to the proper way.
Post not yet marked as solved
5 Replies
That didn't work.
Post not yet marked as solved
6 Replies
I have a similar issue where I have successfully install the app on my watch before, but there are other times when I compile it doesn't transfer the app to my watch. Xcode behaves so inconsistently. Has anyone figured out how to make sure it always gets intalled on your watch?
Post not yet marked as solved
18 Replies
Replied In Watch + SQLite
That's a good point, especially with updates to my default data which I anticipate will be happening. I have decided to keep my static data and user data separate.And to combat my inability to do a join on tables from separate databases, I've just written more routines that achieve what the join would've done but in a more verbose way. I guess that is the best trade-off.
Post not yet marked as solved
18 Replies
Replied In Watch + SQLite
Hi eskimo, going back on this point"When dealing with large databases, it’s important to separate the read-only stuff that’s part of your app (or downloadable content, but downloadable by all users) and the read/write stuff that’s specific to your current user. Without this, you might end up trying to back up your large read-only data set, which will run afoul of the iOS Data Storage Guidelines.In this case, I’d recommend a second database with a HasSeen table that records the ID of every word that this user has seen."By seperating the two databases, I now need to do a left outer between my reference table and user data table. But the tables belong to seperate databases, and I don't know how to do that in sqlite.swift. For simplicity, shouldn't I just keep everything in one table (from one database)?