Post

Replies

Boosts

Views

Activity

External Link Account Application & App Review
Hi, I am developing a Reader App, and am about to submit it for review, and complete the External Link Account Application. The application form asks a series of questions & my app ticks all the boxes and the final question is whether I have submitted the app for review. No answer means I don't get to submit. The instructions for External Link Account says, I should first get approval and then add this entitlement and code it. However, I can't get it till I submit the app for review. Does this mean, I should first submit the app without the External Link Account feature? However, this will not allow the reviewer to fully test the app, as my app is a reader app and uses my website for account set-up which allows for digital content to be seen in the app. Perhaps I should anticipate approval and build in the External Link Account entitelement in the version that I submit for review. Can someone clarify?
3
0
180
Oct ’25
Changing from NavigationView to NavigationStack
Hi, I am having trouble changing from deprecated NavigationView to NavigationStack. I have looked through the article, and a number of examples and tutorials - they all show examples where the user clicks on a choice or a button in the view. But in my case, the navigation is programmatic based on changes to a value. I have below the old code, and my attempt at new revised code ( needs to run on IOS16, and cannot use API introduced in IOS 17). The new code compiles fine, but the screen does not navigate to new views as the value changes. I debug print the value as it changes, and the value for 'detailView' does change. The old code works without a problem - just that I get a warning that I am using deprecated APIs. The old code: struct MainView: View { @EnvironmentObject var gameVm: GameViewModel var body: some View { NavigationView { VStack { NavigationLink(destination: PlayView().transition(.slide), tag: .playView, selection: $gameVm.detailView) { EmptyView() } NavigationLink(destination: GamePausedView().transition(.scale), tag: .gamePausedView, selection: $gameVm.detailView) { EmptyView() } NavigationLink(destination: SettingsView().transition(.slide), tag: .settingsView, selection: $gameVm.detailView) { EmptyView() } IdleView().transition(.slide) } } .navigationViewStyle(.stack) } } My attempt at the revised code: struct GameMainView: View { @EnvironmentObject var gameVm: GameViewModel @State private var path = NavigationPath() var body: some View { NavigationStack(path: $path) { VStack { NavigationLink(value: DetailView.playView) { EmptyView() } NavigationLink(value: DetailView.gamePausedView) { EmptyView() } NavigationLink(value: DetailView.settingsView) { EmptyView() } IdleView().transition(.slide) } } .navigationDestination(for: DetailView.self) { dtlViewType in if dtlViewType == .playView { PlayView().transition(.slide) } else if dtlViewType == .settingsView { SettingsView().transition(.slide) } else if dtlViewType == .gamePausedView { GamePausedView().transition(.slide) } } } } What am I doing wrong? Thanks in advance for any help.
2
0
663
Jun ’24
SpriteKit - Associating sound with motion
I need to associate sound with the movement of a sprite. Movement can be as a result of physics, not as a result of an SKAction. When the object is sliding thee should be sliding sound throughout the time when it is sliding, and then a different sound when it bumps into a rock and goes up in the air. When the object is airborne, there is no sound, till it falls again - a falling sound, and then slides down with a sliding sound. The sounds associated with the collision ( rock, ground and so on ) are straightforward and work fine. But am having difficulty associating the sound with movement. The closest result I have is to check the velocity of the sprite's physics body every update cycle and play or stop the sound based on whether the velocity is greater than zero. I tried SKAction.playSoundFileNamed first - the sound kept going even when the object was not moving. I tried adding an SKAudioNode with Play and Stop, with no better result. I finally tried using AVAudioPlayer to play and Pause , which yielded the best results, but the sliding sound still played past the sliding action. What is the best way to do this? My code for playing the sound is as follows: var blockSliding = false for block in gameBlocks { if (block.physicsBody?.velocity.dx ?? 0) + (ball.physicsBody?.velocity.dy ?? 0) > 0.05 { blockSliding = true break } } if slideSound.isPlaying { if !blockSliding { slideSound.pause() } } else { if blockSliding { slideSound.play() } } I have setup slideSound earlier loading the appropriate sound file into an AVAudioPlayer
0
0
755
Nov ’23
External Link Account Application & App Review
Hi, I am developing a Reader App, and am about to submit it for review, and complete the External Link Account Application. The application form asks a series of questions & my app ticks all the boxes and the final question is whether I have submitted the app for review. No answer means I don't get to submit. The instructions for External Link Account says, I should first get approval and then add this entitlement and code it. However, I can't get it till I submit the app for review. Does this mean, I should first submit the app without the External Link Account feature? However, this will not allow the reviewer to fully test the app, as my app is a reader app and uses my website for account set-up which allows for digital content to be seen in the app. Perhaps I should anticipate approval and build in the External Link Account entitelement in the version that I submit for review. Can someone clarify?
Replies
3
Boosts
0
Views
180
Activity
Oct ’25
Changing from NavigationView to NavigationStack
Hi, I am having trouble changing from deprecated NavigationView to NavigationStack. I have looked through the article, and a number of examples and tutorials - they all show examples where the user clicks on a choice or a button in the view. But in my case, the navigation is programmatic based on changes to a value. I have below the old code, and my attempt at new revised code ( needs to run on IOS16, and cannot use API introduced in IOS 17). The new code compiles fine, but the screen does not navigate to new views as the value changes. I debug print the value as it changes, and the value for 'detailView' does change. The old code works without a problem - just that I get a warning that I am using deprecated APIs. The old code: struct MainView: View { @EnvironmentObject var gameVm: GameViewModel var body: some View { NavigationView { VStack { NavigationLink(destination: PlayView().transition(.slide), tag: .playView, selection: $gameVm.detailView) { EmptyView() } NavigationLink(destination: GamePausedView().transition(.scale), tag: .gamePausedView, selection: $gameVm.detailView) { EmptyView() } NavigationLink(destination: SettingsView().transition(.slide), tag: .settingsView, selection: $gameVm.detailView) { EmptyView() } IdleView().transition(.slide) } } .navigationViewStyle(.stack) } } My attempt at the revised code: struct GameMainView: View { @EnvironmentObject var gameVm: GameViewModel @State private var path = NavigationPath() var body: some View { NavigationStack(path: $path) { VStack { NavigationLink(value: DetailView.playView) { EmptyView() } NavigationLink(value: DetailView.gamePausedView) { EmptyView() } NavigationLink(value: DetailView.settingsView) { EmptyView() } IdleView().transition(.slide) } } .navigationDestination(for: DetailView.self) { dtlViewType in if dtlViewType == .playView { PlayView().transition(.slide) } else if dtlViewType == .settingsView { SettingsView().transition(.slide) } else if dtlViewType == .gamePausedView { GamePausedView().transition(.slide) } } } } What am I doing wrong? Thanks in advance for any help.
Replies
2
Boosts
0
Views
663
Activity
Jun ’24
SpriteKit - Associating sound with motion
I need to associate sound with the movement of a sprite. Movement can be as a result of physics, not as a result of an SKAction. When the object is sliding thee should be sliding sound throughout the time when it is sliding, and then a different sound when it bumps into a rock and goes up in the air. When the object is airborne, there is no sound, till it falls again - a falling sound, and then slides down with a sliding sound. The sounds associated with the collision ( rock, ground and so on ) are straightforward and work fine. But am having difficulty associating the sound with movement. The closest result I have is to check the velocity of the sprite's physics body every update cycle and play or stop the sound based on whether the velocity is greater than zero. I tried SKAction.playSoundFileNamed first - the sound kept going even when the object was not moving. I tried adding an SKAudioNode with Play and Stop, with no better result. I finally tried using AVAudioPlayer to play and Pause , which yielded the best results, but the sliding sound still played past the sliding action. What is the best way to do this? My code for playing the sound is as follows: var blockSliding = false for block in gameBlocks { if (block.physicsBody?.velocity.dx ?? 0) + (ball.physicsBody?.velocity.dy ?? 0) > 0.05 { blockSliding = true break } } if slideSound.isPlaying { if !blockSliding { slideSound.pause() } } else { if blockSliding { slideSound.play() } } I have setup slideSound earlier loading the appropriate sound file into an AVAudioPlayer
Replies
0
Boosts
0
Views
755
Activity
Nov ’23