Post not yet marked as solved
I have my remote push notifications managed by cloud messaging in Firebase. When I build my appliation from Xcode, remote push notifications display perfectly on my device. However, any devices that have installed the app through TestFlight will not get the notifications. Will my remote push notifications work once it is launched on the AppStore?
Post not yet marked as solved
I have this class: class Explosion : SKSpriteNode {
var gameScene : SKScene
var explosionPoint : CGPoint
init(_ gameScene : SKScene, _ explosionPoint : CGPoint){
self.explosionPoint = explosionPoint
self.gameScene = gameScene
let size : CGSize = CGSize(width: gameScene.size.width * CGFloat(0.23), height: gameScene.size.width * CGFloat(0.23))
super.init(texture: SKTexture(imageNamed: "Explosion_1"), color: UIColor.clear, size: size)
}
public func startExplosion(){
self.position = explosionPoint
gameScene.addChild(self)
let animation = SKAction.animate(withNormalTextures: getFrames(), timePerFrame: 0.1)
self.run(SKAction.sequence([animation, SKAction.removeFromParent()]))
}
private func getFrames() -> [SKTexture] {
var frames : [SKTexture] = []
for x in 1...12 {
frames.append(SKTexture(imageNamed: "Explosion_\(x)"))
let cat = SKTexture(imageNamed: "Explosion_\(x)")
print(cat)
}
return frames
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}Now, this SKSpriteNode is supposed to be a gif, so I run the animation here: public func startExplosion(){
self.position = explosionPoint
gameScene.addChild(self)
let animation = SKAction.animate(withNormalTextures: getFrames(), timePerFrame: 0.1)
self.run(SKAction.sequence([animation, SKAction.removeFromParent()]))
}And I run it from the main SKScene like this: override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
let touch = touches.first
let touchLocation = touch!.location(in: self)
Explosion(self, touchLocation).startExplosion()
}However, when the node is added to the scene, it doesn't actually run the animation. It stays with the initial texture. How do I make the node run the action?I have tried assigning the explosion object to a variable and also tried using repeatForever, both failed. I also tried doing everything without using the custom class Explosion, like so: var explosion : SKSpriteNode!
override func touchesEnded(_ touches: Set<UITouch>, with event: UIEvent?) {
let touch = touches.first
let touchLocation = touch!.location(in: self)
explosion = SKSpriteNode(imageNamed: "Explosion_1")
let lolsize : CGSize = CGSize(width: self.size.width * CGFloat(0.23), height: self.size.width * CGFloat(0.23))
explosion.position = touchLocation
explosion.size = lolsize
explosion.zPosition = 100
var textures = [SKTexture]()
let atlas = SKTextureAtlas(named: "Explosion")
for i in 1...atlas.textureNames.count {
let name = "Explosion_\(i)"
print(name)
textures.append(SKTexture(imageNamed: name))
}
self.addChild(explosion)
explosion.run(SKAction.repeatForever(SKAction.animate(withNormalTextures: textures, timePerFrame: 0.1)))
}However, it gives the same result. The only texture that appears is the initial one "Explosion_1". There is no animation.
Post not yet marked as solved
I am building a 2d game using SpriteKit for iPhone. It is inteded to only be used horizontally. I have tested it with every iPhone and it scales proportionally perfectly. However, when I was testing it out on an iPad, in one particular menu, a couple buttons were a bit off-centered, looking weird and obviously demonstrating it wasn't intended. I don't really expect this to be an iPad game, but would it be an issue for approval? Also, I have employed SKNodes to function as for example back buttons in some of my menus. This nodes use png's that are around 1000x1000px. Is this allowed, to use nodes for my UI that use png's with custom sizes?
Post not yet marked as solved
I have been a little bit concerned over whether I should fill up all my assets with the respective universal sizes:https://i.stack.imgur.com/0V0Tn.pngI have around 20-30 images so it'd be a concern if I have to add three png's per asset. Is this required to submit my application? My app has run fine without the other sizes? (x2, x3)All my images are 1000px big. I have tested my app on an iPad pro and it looks just as good
Post not yet marked as solved
I am submitting an application soon and it is my first so I was looking on some recommendations on CPU percentage:https://s18.postimg.org/5t4em4uyx/Screen_Shot_2017-07-23_at_6.40.53_PM.pngI get around 90% around all the time. Is that a bad percentage?Moreover, when I tested the application on my iPhone 5, the energy impact was very high:https://s11.postimg.org/sk2398coj/Screen_Shot_2017-07-23_at_6.47.34_PM.png
Hi,First of all, I will apologize if I stray off from any convenctions in these forums since it is my first time posting here. I have been developing a small game with a partner at school. We are both in high school and are enthusiasts about computer science. We have been working on a game built solely on Swift, using the SpriteKit engine. While I wouldn't say our game isn't the most spectacular, it is a solid first game which has taken thousands of lines to finish. Our project was initially on GitHub, but after putting a decent amount of work into it, we decided to move it into GitLab as a private repository to avoid anyone from just cloning our project and claiming it as their won. This raises a couple concerns for me: not being able to display my source code to my teacher or any classmates for feedback and not being able to display our efforts on a resume or to any entities that would appreciate our GitHub project. What do you recommend we do about this project? If we were to launch it back on GitHub, could we prevent anyone from just cloning our project and publishing it in the App Store as their own, maybe just with a different name?Moreover, I wanted to ask about how to submit the application. I understand I can submit the application as an individual or a company. However, is there any option that will allow me and my partnert to submit our application as a joint-team? We do not have a company so the other option would be for just one of us to submit it.Thank you