In order to support the arm64, has been a long time, last night packaging ready to submit the Apple review, test colleagues over there feedback that the game upload custom Avatar feature is not available.
Introduction to the Game Upload Customization feature: The card game was originally "tournament Zhaoqin" has a VIP after the use of the upload custom function privileges, our game "copy" the feature.
The specific implementation is to click on the game in the custom Avatar button, call different platform corresponding method, get the user selected image data, and then clip the picture to the background to save to a specific directory.
The test device is ipad Air2, the system version of iOS 8.0.1, click the In-game button directly unresponsive.
First question: No response after a click
The reason is that the parameters of the Uiactionsheet Showinview method were previously set to Self.view.window (Nsinvalidargumentexception, Reason:sheet can not is Presented because the view is not in a window)
Second question: Click the Select Album button and then no more
There are also two questions here, one is the button that shows only one "select album"
The reason is that Uiactionsheet has been deprecated in iOS8 (click to view Details >>) and replace with Uialertcontroller, here are two documents to describe it:
Uialertcontroller in Ios8>>
Uialertcontroller>>
After tracing the code, it is found that the Popovercontrollerdiddismisspopover method is called directly after calling the Presentpopoverfromrect method of Uipopovercontroller.
This link was found by searching for "iOS8 ipad uipopovercontroller" (Uipopovercontroller not presenting in ipad IOS 8), See stackoverflow.com feel to be saved, today no longer all night ...
From the New Year's Day holiday back to work the first days, counted today has continuously added 7 days class, encountered a few problems are particularly unfamiliar, the sense of powerlessness is very heavy also very frustrated, no clue, feel unable to start, there was a problem two or three days of time I looked at the crash but can not find the place to do. Too unfamiliar with that field or that thing, and Google was just dropped by the wall. Access is intermittent. Now that the problem is solved, in retrospect, the luck ingredient is really big. Because I have a lot of questions to test them, and then let me solve the bug, I would not think of that place up.
After the most recent update feature, the Restart button on the iOS device has been clicked and the game has been flashed directly, with a higher probability. After the breakpoint, looking at the screen crash the solution, the bottom is the Cocos2d-x 2.x version, the upper layer is a C + + package, and then the above is LUA wrapped a layer, check the stack also really can not find where to call the special thing, restart that piece of logic code and did not move, It's depressing. The night before the big Midnight gave up, go home to sleep in the dream, the second morning all checked a morning, still did not find. Eat at noon, and then look at that crash place Cocos2d-x in the CCDictionary.cpp Objectforkey method of the breakpoint hanging off
Assertion of this line of code directly hanging off, and then to the last call, from CCINode.cpp, online and search for a bit, we use the code is to modify the code on the Internet, and did not find the problem, seemingly no solution. When I was ready to give up, I suddenly thought that there was a function in the main interface of the new function which had the display of the call SWF for the effect, and then I looked it was hidden. Then I think since the hidden, then do not let it play, the results of a test, ah, not collapse! It's amazing, and then the code goes back and tries it, okay! It's all right! The log shows that the game has started, and all began to request the resources on the CDN, but the interface is still stuck in the restart that interface, but the point of collapse is hanging in the CCDictionary.cpp.
Replaced IOS8.1 SDK, upload avatar function is not available, search for a long time to find all with their own problems, when the input of specific keywords out of the first is what they want, the results of a few minutes to solve the problem, but find the answer before it has spent nearly 4 hours ...
From JavaScript Web development, to ActionScript web game development, to C + + hand-tour development, along the way, feel really touch the stone in the river, the version of the mobile platform upgrade quickly, let me wait for developers to feel the pain. I really hope that one day I can dominate the game framework based on HTML5 and apply it to the project, I hope this day, the wind turbine flow. End Tour –> page Tour –> Hand tour, today's hand Tour development mode is like yesterday's End of the tour.
As a hand-tour developer, to learn and master the knowledge of a wide range: C + + Foundation to use it, LUA at least can use very handy, Android to be more familiar with it (or how to pick up the SDK, fix some bugs it), iOS is the same, or as I often face the problem, the keyboard on each platform, Uploading avatars and other problems is like a big mountain block in front of you. There is no more solid basic skills, it is difficult to cope with one after the problem, this does not talk about the game specific features of the implementation of the problem. The road long its repair far XI, I will go up and down and quest!
Upgrade IOS8 game upload custom avatar function failure problem