Post

Replies

Boosts

Views

Activity

Identifying users using app in different platforms (iOS and macOS) and different bundle ids
I am trying to grant access to users that subscribe to premium on the iOS app also to users that use the macOS version. The iOS and macOS version are two separate apps with different BundleIDs, same Team ID. I can't create a App bundle because they are part of different platforms. I know that I could ask the user for a login so I could recognize the user from the authentication, but I would like to avoid this step. Is there any ID i can use to identify users between different platforms?
1
0
444
Jun ’24
NavigationLink selection not working as expected
I am probably missing something but I can't make the NavigationLink work inside a List. I'm using NavigationLink(destination, tag, selection) And i would like to pop to the root view with a tap on a button as you can see in this sample project: 		@State var selectedView : Int? = nil var colors : [String]		= ["blue", "yellow", "green", "red", "black"] 		var body : some View { 				NavigationView { 						List { 								ForEach (colors.indices) 								{ 										index in NavigationLink ( 												destination : ColorDetail ( 														selectedView : self.$selectedView, 														color : colors [index] 												), 												tag : index, 												selection : self.$selectedView, 												label : {														 Text(colors[index])												 } 										) 								} 						} 				} 		} } struct ColorDetail : View { 		@Binding var selectedView : Int? var color : String var body : some View { 				VStack { 						Text (color) 						Text ("SelectedView: \(selectedView ?? 99)") 						Button ("set SelectedView to nil and go back") 						{								 self.selectedView = nil						 } 				} 		} } Why if I set selectedView to nil nothing happens? How can i pop to the root view (ContentVIew) from the ColorDetail on a button tap? Just copy this code and try it, it will build.
1
0
1.4k
Dec ’20