What is the best way to change just one image in an App Connect Build while waiting for review?
Zero code changes, just one Image Asset.
Please tell me I do not have to delete Build and start from scratch! for one lousy image!
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Cannot find how App Connect shows "Unresolved Issues" on an Approved + Uploaded App.
Would appreciate some hints. Thanks in advance!
Cannot look at contents of file in Print Queue with Sonoma
Before Sonoma, after I selected print in a application, e.g., Word, I could double click on the document stored in the Print Queue and the pages would be displayed.
With Sonoma, cannot see file contents??
One last thing pertaining to this Print Queue =
I can't delete any of the accumulated "Completed" Jobs .. menu item to delete selected Jobs is dimmed??
Can you access the objects in a struct from outside the struct?
So far I have a group of HStacks and VStacks whose embedded objects are all Images(“name”).
By definition these Images are fixed in terms of their .position and .size for example.
Can I dynamically access these embedded objects from outside the struct?
in short, move them ?
Do I really have to reset position and size of SKSpriteNodes with every rotation between landscape and portrait layout??
I've done that and it works .. but this seems to be overkill that the writers of Xcode internally compensated for .. vs. having the individual programmer having to do it.
I have a getGameParms() which resets positions based on:
#if os(iOS) && !targetEnvironment(macCatalyst)
func getGameParms() {
let roomRect = UIScreen.main.bounds
roomWidth = roomRect.width * roomScale
roomHeight = roomRect.height * roomScale
if (thisSceneName == "GameScene")
{
if UIDevice.current.orientation.isLandscape {
// changes here
}
else {
// changes
}
} // if (thisSceneName == "GameScene")
} // getGameParms
#elseif os(tvOS)
func getGameParms() {
let roomRect = UIScreen.main.bounds
roomWidth = roomRect.width * roomScale
roomHeight = roomRect.height * roomScale
if (thisSceneName == "GameScene")
{
// other changes here
}
} // getGameParms
#endif
Again, the burdensome changes are done .. but are they really necessary?
As an alternative, I have called getGameParms() just once within my viewDidLoad() and the results are not correct.
For example, I place one SKSpriteNode at the very bottom of the UIScreen and it does not stay there with UIDevice rotation. I also size it horizontally such that it expands to the full width of the UIScreen. Rotation destroys that. if getGameParms() is called only once as just described.
Some explanation as to why would be appreciated.
How to attach a struct to the main GameViewController?
This struct occupies the top half of the main ViewController.
The goal is to have this struct be part of the main GameViewController and not in separate UIHostingController.
SO, when I rotate the main SKScene for example the struct also rotates OR when I switch SKScenes both the top-half struct and the bottom-half switch together because they are one SKScene.
The programmer who invented HStacks and VStacks is a blooming genius … but I need to avoid what I have now which is the HStack VStack combo closing and then its neighbors in the main SKScene closing.
Here are the essential code segments - all in my GameViewController:
Declared at the top:
var useGSO = false
var gsoChildVC: UIViewController! // = UIHostingController
override func viewDidLoad() {
showScene()
/*
"gso" = "Game Static Objects"
*/
if useGSO {
// create a UIHostingController and extract a rootView for later processing
gsoChildVC = UIHostingController(rootView: GameStaticObjects())
}
} // viewDidLoad
Within my showScene():
func addGamePieces(toScene: SKScene) {
if thisSceneName == "GameScene" {
// various SKSpriteNodes
//
// STATIC People, Animals and Buildings
// are now added to the top of our SKScene
//
addGSOChild(toScene: toScene)
} // if thisSceneName == "GameScene"
else {
removeGSOChild()
}
} // addGamePieces
func addGSOChild(toScene: SKScene) {
// gsoChildVC = nil *if* useGSO = false
guard gsoChildVC == nil else {
let gsoParentVC = self // parent = us = GameViewController
// default value
// gsoChildVC.view.translatesAutoresizingMaskIntoConstraints = true
/**/
let sameWidth = gsoParentVC.view.bounds.width
let newHeight = 0.5 * gsoParentVC.view.bounds.height
let boundsWithNewBottom = CGRectMake(0.0, 0.0, sameWidth, newHeight)
gsoChildVC.view.frame = boundsWithNewBottom
/**/
// first, add the view of the hild to the view of the parent
gsoParentVC.view.addSubview(gsoChildVC.view)
// then, add the child to the parent
gsoParentVC.addChild(gsoChildVC)
// notify the child ViewController that we're finished
gsoChildVC.didMove(toParent: gsoParentVC)
return
}
} // addGSOChild
func removeGSOChild() {
// gsoChildVC = nil *if* useGSO = false
guard gsoChildVC == nil else {
// First, remove the Child from its Parent
gsoChildVC.removeFromParent()
// Then, remove the Child's view from the Parent's
gsoChildVC.view.removeFromSuperview()
return
}
} // removeGSOChild
As stated at the top of this OP, the HStack and Stack code appears great .. but the UIHostingController is distinct from my GameViewController. As a direct result, such operations as switching SKScenes is done in 2 halves - (1) the HStack and Stack top half and (2) whatever non-struct stuff appears below it.
If I switch SKScenes, I want both halves to switch as one entity.
FWIW, the struct that contains the HStack and Stack code is outside the GameViewController class as suggested by Apple.
and as specified above, I call:
gsoChildVC = UIHostingController(rootView: GameStaticObjects())
within my viewDidLoad() method.
I would love some basic guidance here as to what basic error I am making.
How do I change just the starting point of an existing UIBezierPath? .. and leave all other points the same?
I have definitely seen many posts on how to do this .. honestly, I just do not understand many of them
My existing path has one .move(to:) and many .addLine(to:)
My goal is:
(1) replace the .move(to:) with .addLine(to:) and then
(2) change one of the .addLine(to:) with .move(to:)
All other CGPoints stay the same.
In order to get the new starting point, I set:
savedPathPoint = myPath.currentPoint
when I stop the following motion.
At some point, I want to resume this following motion with the new starting point = savedPathPoint via
myPath.move(to: savedPathPoint)
let myAction = SKAction.follow(
myPath.cgPath,
asOffset: false,
orientToPath: true,
duration: 0.1)
mySprite.run(myAction)
When I look at the above problem description, it really appears simple.
Nevertheless, its implementation alludes me.
Thanks bunches in advance for any hints whatsoever.
How do I change a UIBezierPath.currentPoint to a SKSpriteNode.position?
Here are the appropriate code snippets:
func createTrainPath() {
let startX = -tracksWidth/2,
startY = tracksPosY
savedTrainPosition = CGPoint(x: startX, y: startY!)
trackRect = CGRect(x: savedTrainPosition.x,
y: savedTrainPosition.y,
width: tracksWidth,
height: tracksHeight)
trainPath = UIBezierPath(ovalIn: trackRect)
trainPath = trainPath.reversing() // makes myTrain move CW
} // createTrainPath
Followed by:
func startFollowTrainPath() {
let theSpeed = Double(5*thisSpeed)
var trainAction = SKAction.follow(
trainPath.cgPath,
asOffset: false,
orientToPath: true,
speed: theSpeed)
trainAction = SKAction.repeatForever(trainAction)
createPivotNodeFor(myTrain)
myTrain.run(trainAction, withKey: runTrainKey)
} // startFollowTrainPath
So far, so good (I think?) ...
Within other places in my code, I call:
return trainPath.currentPoint
I need to convert trainPath.currentPoint to myTrain.position ...
When I insert the appropriate print statements, I see for example:
myTrain.position = (0.0, -295.05999755859375)
trainPath.currentPoint = (392.0, -385.0)
which obviously disqualifies a simple = , as in:
myTrain.position = trainPath.currentPoint
Since this = is not correct, what is ?
After more investigation, my guess is that .currentPoint is in SKSpriteNode coordinates and .position is in SKScene coordinates.
I submitted a TSI about 3 weeks ago.
Got an automated reply giving me my TSI ID. Unfortunately I cannot find that ID anywhere.
Can any of you detectives find that ID for me?
I guess I am a little curious as to when one of their super smart DTS programmers will contact me.
My Bad
John Love
Here is a link to a super long conversation with a true genius at StackOverflow
https://stackoverflow.com/questions/78343630/what-algorithm-is-available-to-correlate-a-skspritenodes-position-with-the-uibe/78379892#78379892
He has done an extraordinary amount of work to make up for what I consider is the non-working of UIBezierPath’s orientToPath = true.
He’s done multiple hours work to make up for orientToPath = true not working.
What are we missing?
How do I set the static position of a SKSpriteNode so that it tilts toward the UIBezierPath as if it were following this Path?
When I first start my App, these Nodes are all aligned in a straight line
When I call:
var trainAction = SKAction.follow(trainPath.cgPath,
asOffset: false,
orientToPath: true,
speed: thisSpeed)
for moving the train, the train + each car will orient its tilt to hug the trainPath.
But I want the identical tilt to hug the trainPath for its initial static presentation.
How do I do that?
Using Swift, how do I resize individual SKSpriteNodes for various iPad device sizes?
Currently, I use theScene.scaleMode = .resizeFill for scaling the entire SKScene and it works as advertised. Please note that .aspectFill does not solve the challenge described below.
My challenge is to resize individual SKSpriteNodes (that are components of the overall SKScene) based on size of the iOS device; for example, iPad Mini <--> iPad Pro
Right now, I hard code the sizes of these Nodes. But I realize this is not the optimum approach.
Again, hard coding is frowned upon. So I am looking for a more dynamic method that functions based on device size.
Topic:
Graphics & Games
SubTopic:
SpriteKit
Problem = PlaySound below crashes with this error:
AddInstanceForFactory: No factory registered for id
Setting a breakpoint before the guard let url block = NO error.
Setting a breakpoint after the guard let url block = error!!, coupled with a horrible static sound happening. Note that if I set NO breakpoints, the correct sound happens but with the above error.
What am I missing?
Within my SKScene Class:
func controllerInputDetected(gamepad: GCExtendedGamepad,
element: GCControllerElement,
index: Int) {
// rightShoulder
if (gamepad.rightShoulder == element)
{
if (gamepad.rightShoulder.value != 0)
{
startGame()
}
}
}
As shown above, I call the following function by pressing a shoulder button on my Gamepad:
func startGame() {
PlaySound(theSoundName: "roar")
}
func PlaySound(theSoundName: String) {
guard let url = Bundle.main.url(forResource: "audio/" + theSoundName, withExtension: "mp3") else {
print("sound not found")
return
}
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default)
try AVAudioSession.sharedInstance().setActive(true)
itsSoundPlayer = try AVAudioPlayer(contentsOf: url)
if theSoundName == "roar" {
itsSoundPlayer?.numberOfLoops = -1 // forever
}
itsSoundPlayer!.play()
}
catch let error as NSError {
print("error: \(error.localizedDescription)")
}
}
Again, what am I missing?
App Review Process
(1) first attempt: rejected for a reason not supported by App Connect. For example, “You did not state that your App requires a Game Controller”. 100% refuted by App Connect’s description and promotional texts for all Apps in the App Store.
(2) second attempt = I get accused of a personal attack. Crocodile tears when in fact I am simply building a stream of logic that refutes their non-factual assertions.
This futile attempt to dissuade others is very often used when they can no longer refute the logical responses.
This attempt is quite often used by politicians.
(3) their last resort is to simply ignore my submission and forever keep my status = In review. Life in prison without parole.
(4) good question = do I put my legal team into gallop mode?
Why?
Because I and many others have reported very similar issues.
Someone needs to say “No more!”
(5) These issues all reduce to one = a deity complex that many Reviewers have. Synonymously they are saying “We have power and we will crush you”.
For this reason their rejection reasons become a moving target.
Most of the time this ploy works, but not now.
(6) I am a retired United States Air Force officer and we all saw this deity complex in full display in the late 1930’s …
Auschwitz occurred and World War II resulted.
I saw it up close and personal in Vietnam. I personally saw Quonset huts full of dismembered U.S. heroes.
And we see it full grown now here and overseas .. leaving the probability of World War III = high.
The clique of long ago App Developers will most likely result in slanderous statements against me.
But sometimes an adult must stand and say “ No more!”
The reason I ask centers on the fact that my "Monster Paddle Pong" has been uploaded to the App Store - and it works!
BTW: Search within Apps - not Games!
Within Xcode I selected App Category = Games and the above search agrees with that.
My question = how can I in the future make my Game appear under Games in the App Store and not under Apps?