Post

Replies

Boosts

Views

Activity

Reply to Xcode simulator does not show the same as Preview
Your code will not build in Xcode, as you have not supplied the definition of "tamanosDispositivos". I think "func interfazCambio ()" should be within "tamanosDispositivos"? Your code for "func interfazCambio ()" is not valid (there is an "else if", which is not part of an "if" statement). So it is very difficult to say what might be going wrong. However, I can make some general comments: You seem to have made things very, very complicated. This does not seem to be in keeping with the principles of SwiftUI, which allow the building of a device-independent User Interface, without explicitly accounting for every variation between the different screen sizes (as you seem to do). I would suggest that you simplify your UI down to a minimal specification, and get that working first: What Views appear on screen? What are the spatial relationships between them? What conditions affect these? I would also suggest that you consider abandoning the external code library (which is just an extra complication, at this stage), and use standard SwiftUI until you have a more thorough understanding of it. (This only affects "VisualEffectBlurView", in the supplied code.) You might also want to consider some further study of SwiftUI... ...I highly recommend Paul Hegarty's Stanford course, at https://cs193p.sites.stanford.edu If you have more specific issues, I suggest you post them here on the forum, as new questions.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to app rejection in app store
You seem to be saying that your app is about watching ads. Apple agree that: "The primary purpose of your app is to encourage users to watch ads" And they also say that this: "...is not appropriate for the App Store" You mention your app is "exactly like goodeed" (perhaps you mean "GoodDeed"?) It is not a good idea to simply copy an existing app, but in any case, the presence of existing apps on the App Store will not help your own submission (especially if you are rejected for being a copy of another app). Your app's submission will have to succeed on it's own merits. If you want your app to be approved, you will have to add some more functionality to it, beyond just watching ads.
Nov ’21
Reply to self is used before all properties are initialized (Swift)
I like it as it gets rid of the optional. However, but that still requires that the property 'callback' in ModelDemo and the property 'modelDemo' need to be var's. If there was a way to do everything in the init(), they could be let's You could protect the vars by making them "private (set)" (which, as you probably know, makes them read-only to the outside world (as if they were "let")). Giving this: struct ModelDemo { private (set) var callback: () -> () = {} mutating func setCallback(_ callback: @escaping () -> ()) { self.callback = callback } } final class ViewModelDemo { private (set) var modelDemo = ModelDemo() init() { modelDemo.setCallback(modelCallback) } private func modelCallback() { } }
Topic: Programming Languages SubTopic: Swift Tags:
Nov ’21
Reply to LazyVGrid in Xcode 13 ignores Spacer
In GridItem, you can specify the alignment, which in your example is .topLeading Try: private let columns = Array(repeating: GridItem(.flexible(), spacing: 24, alignment: .topLeading), count: 4) That seems to give the result you want. It can be possible for default values to change, between versions of Xcode? Probably best to specify the exact behavior that you want.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’21
Reply to App Store Connect requires invited users to not have apple id
Is it possible that the email address that is showing as an existing Apple ID really is an existing Apple ID? Perhaps the Apple ID was created via a previous attempt, or it was created some time ago (note the "...never been associated..." requirement). To confirm, you could test if it is possible to log in using that email as an Apple ID.
Replies
Boosts
Views
Activity
Nov ’21
Reply to App Store Connect requires invited users to not have apple id
Of course you are right, the message could be more helpful. Good that you were able to solve it. It is possible to add an Apple ID to multiple organizations (I do this)... ...but presumably as an existing ID, not a new one?
Replies
Boosts
Views
Activity
Nov ’21
Reply to Xcode simulator does not show the same as Preview
Your code will not build in Xcode, as you have not supplied the definition of "tamanosDispositivos". I think "func interfazCambio ()" should be within "tamanosDispositivos"? Your code for "func interfazCambio ()" is not valid (there is an "else if", which is not part of an "if" statement). So it is very difficult to say what might be going wrong. However, I can make some general comments: You seem to have made things very, very complicated. This does not seem to be in keeping with the principles of SwiftUI, which allow the building of a device-independent User Interface, without explicitly accounting for every variation between the different screen sizes (as you seem to do). I would suggest that you simplify your UI down to a minimal specification, and get that working first: What Views appear on screen? What are the spatial relationships between them? What conditions affect these? I would also suggest that you consider abandoning the external code library (which is just an extra complication, at this stage), and use standard SwiftUI until you have a more thorough understanding of it. (This only affects "VisualEffectBlurView", in the supplied code.) You might also want to consider some further study of SwiftUI... ...I highly recommend Paul Hegarty's Stanford course, at https://cs193p.sites.stanford.edu If you have more specific issues, I suggest you post them here on the forum, as new questions.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to app rejection in app store
{removed}
Replies
Boosts
Views
Activity
Nov ’21
Reply to app rejection in app store
You seem to be saying that your app is about watching ads. Apple agree that: "The primary purpose of your app is to encourage users to watch ads" And they also say that this: "...is not appropriate for the App Store" You mention your app is "exactly like goodeed" (perhaps you mean "GoodDeed"?) It is not a good idea to simply copy an existing app, but in any case, the presence of existing apps on the App Store will not help your own submission (especially if you are rejected for being a copy of another app). Your app's submission will have to succeed on it's own merits. If you want your app to be approved, you will have to add some more functionality to it, beyond just watching ads.
Replies
Boosts
Views
Activity
Nov ’21
Reply to self is used before all properties are initialized (Swift)
How about this: struct ModelDemo { var callback: () -> () = {} } final class ViewModelDemo { var modelDemo = ModelDemo() init() { modelDemo.callback = modelCallback } private func modelCallback() { } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Apple Push Services without key
Are you asking for help, or just expressing your frustration?
Replies
Boosts
Views
Activity
Nov ’21
Reply to self is used before all properties are initialized (Swift)
I like it as it gets rid of the optional. However, but that still requires that the property 'callback' in ModelDemo and the property 'modelDemo' need to be var's. If there was a way to do everything in the init(), they could be let's You could protect the vars by making them "private (set)" (which, as you probably know, makes them read-only to the outside world (as if they were "let")). Giving this: struct ModelDemo { private (set) var callback: () -> () = {} mutating func setCallback(_ callback: @escaping () -> ()) { self.callback = callback } } final class ViewModelDemo { private (set) var modelDemo = ModelDemo() init() { modelDemo.setCallback(modelCallback) } private func modelCallback() { } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Connect an Iphone and an External Camera over Wifi
Rather than asking the same question again, it's better to add a new comment to your original post. That way, you don't clog up the forum with unanswered questions.
Replies
Boosts
Views
Activity
Nov ’21
Reply to Hoe to use WebKit?
For a while, you should be able to edit your post, to correct the typo in it's title.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to LazyVGrid in Xcode 13 ignores Spacer
In GridItem, you can specify the alignment, which in your example is .topLeading Try: private let columns = Array(repeating: GridItem(.flexible(), spacing: 24, alignment: .topLeading), count: 4) That seems to give the result you want. It can be possible for default values to change, between versions of Xcode? Probably best to specify the exact behavior that you want.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Few cores in system is taking more load
Do you have a question?
Topic: Machine Learning & AI SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to LazyVGrid in Xcode 13 ignores Spacer
Did that fix it for you, @karig?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to NumberFormatter on iOS 15
Do you have a question?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Safari Can't Open the Page
Is it possible that there is no space left on the device?
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Dec ’21