Attempting to Hack Scores in 'Snake Battle'

Yesterday, a classmate recommended a popular game called “Snake Battle,” which has recently climbed to the second spot on the App Store’s overall rankings. Whenever I had some free time over the past couple of days, I’d pull out my phone to play a few rounds. However, I hit a bottleneck in the endless mode around 3000 points, so I decided to take a closer look at the game’s API purely out of curiosity… ...

August 28, 2016 · 3 min · Zhiya

Configuring a Flask Project with Nginx+Supervisor+Gunicorn on Alibaba Cloud CentOS7

This document records the setup of a production environment for a Flask application on Alibaba Cloud’s CentOS7. Configuring CentOS7 After logging in as root, first create a new regular user and set a password: adduser user passwd user Next, copy the user’s public key to ~/.ssh, name it authorized_keys, and modify /etc/ssh/sshd_config to disable root login via SSH, change the default SSH port, and use certificate login. Modify the following settings: ...

June 11, 2015 · 3 min · Zhiya

Issue with PushViewController in viewDidAppear

I needed to push another ViewController (SecondViewController) from the viewDidAppear method of a ViewController (FirstViewController), so I used the following code: - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; UIViewController *secondViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"secondViewController"]; [self.navigationController pushViewController:secondViewController animated:YES]; } In iOS 8, this code works well. When FirstViewController appears, SecondViewController is pushed immediately, and even if the animated parameter is YES, the push animation does not display. However, in iOS 7, the situation is different. It seems that the pushViewController method does not execute, and SecondViewController is not pushed. Breakpoints show that the pushViewController method is indeed executed, but there is no effect on the interface. ...

March 13, 2015 · 1 min · Zhiya

Using TestFlight for App Beta Testing

TestFlight has been integrated into iTunes Connect by Apple, making it very convenient to conduct beta testing for apps. Here’s an introduction on how to use TestFlight for testing, along with some minor issues you might encounter. First, you need to enable TestFlight in iTunes Connect. You can decide whether to enable TestFlight for a specific version of each app. Go to iTunes Connect -> My Apps -> a specific app -> Prerelease, and in the upper right corner of the uploaded build, turn on the TestFlight switch. This will start TestFlight for that version. ...

October 30, 2014 · 3 min · Zhiya

Perfect Combination of LaunchImage and LaunchScreen in iOS8

In iOS8, Apple introduced LaunchScreen.xib to replace the previous LaunchImage as the app’s launch interface. Compared to LaunchImage, LaunchScreen.xib is undoubtedly more convenient with AutoLayout, especially as iOS device screen sizes become increasingly diverse. Otherwise, an app compatible with iPhone5 to iPhone6Plus would require four different sizes of LaunchImages. However, LaunchScreen is only supported in iOS8, so some developers still choose the traditional LaunchImage method. There’s also a way to combine LaunchImage and LaunchScreen: using LaunchScreen for larger iPhones (iPhone6 and iPhone6Plus, which both run iOS8) and LaunchImage for iOS7 (since iOS7 phones only include 4-inch and 5.5-inch iPhones, only two images are needed). ...

October 25, 2014 · 1 min · Zhiya