Fixing old cocos2d project on iOS 7 - xcode

I've created an iPhone game which utilizes some code from an old version of the Cocos2D iPhone game development framework and I've got a wee bit of a problem running it on iOS 7.
The version of Cocos2d from which the code was used was probably 0.98.
The actual class is called QuadParticleSystem (in newer versions it's been deprecated by CCParticleSystemQuad).
The actual issue is that the game runs fine on iOS 6 and below. It even runs fine on iOS 7 if the deployment target is set to iOS 6.0 and SDK version set to 7 (at least when put on the device directly using XCode).
The problem is that when the game is uploaded to the appstore, Apple seems to strip out the whole iOS 6 compatibility thing and the particle emitters fail to show up among other things like alpha transitions, invisibility etc.
(They initialize correctly and everything, but they simply DO NOT render).
I've considered (and tried somewhat) upgrading the Cocos2D version, but due to the old third-party frameworks I've used for other things there is a hell of a lot of linking/dependency/deprecation errors which could take forever to fix (if it's at all possible, which I doubt) In other words, I've wasted too much time on the project already and am looking for a quick fix.
If no one knows any solutions could anyone at least direct me to docs where I can see how to create/insert a new particle emitter system in the existing code?
I've thought about using SpriteKit's native emitter system, but I don't know how to incorporate it within the current code (as I've never had dealings with SpriteKit) and am not sure if it's even possible.
I've also thought of maybe upgrading the GL ES framework within that old version of Cocos2D just in case Apple have killed off some functionality of older versions of OpenGL. Then again that could take a while.

Related

Xamarin UI test alternative

I started using Xamarin.UITest for cross-platform testing (IOS & Android).
With Android it worked instantly without any problem and it keeps forking even after any SDK update or JDK.. name it!
But for iOS there was so many issue encountered with the device agent that didn't want to start, the wrong Xcode commande one, the wrong Xcode. Some time it worked, but out of no where it crashes.. then you must clean, rebuild, retry, cross your fingers it doesn't crash or at least that it will launch..
But now April 19 2019, I had an iOS update, combine with an Xcode update and sadly, it doesn't work anymore. I made a lot of research and attempt to recover my test case:
Downgrade Xcode to 10.1
Downgrade Xcode commande line tool to 10.1
downgraded the OS!
To finally rethink it. It's not a good solid testing tool if it breaks at every updates.
On the AppCenter it still works for both platform. But to create your test, you have to run them locally.. You can't anymore with iOS and if you find how to make it work, let me tell you : "See you for the next update!"
So the question is:
What are the alternative to do some automated UI test for iOS & Android using Xamarin?
Xamarin.UITest Xcode 10.2 support
Sorry to hear about your difficulty with the Xcode update.
Unfortunately Xcode minor updates for the last several releases have tended to break local iOS simulator testing, and occasionally device testing. I've seen this be an issue since at least as early as Xcode 9.x versions.
For context, Xcode 10.2 support was added in this package: https://www.nuget.org/packages/Xamarin.UITest/2.2.7.2002-dev
If you or future readers of this discussion still do end up using Xamarin.UITest, I recommend checking the release notes when new minor versions of Xcode come out to see if that support has been confirmed. Typically the support has been added in the 1st Xamarin.UITest package released after a new minor version of Xcode has been released.
(I generally haven't seen this issue with patch versions though, for example Xcode 10.2.1 didn't seem to cause any issues when it came out if it was run against a test suite that was working for Xcode 10.2)
Other testing frameworks
As for other testing frameworks, if you're using App Center itself; then Appium (JUnit) or Calabash are both able to be used with App Center Test and can be used cross-platform to run against your IPA/APK, generally regardless of what was used to write the apps in the first place, like Xamarin.UITest. (Though each framework has slightly different set up requirements and limitations.)
Outside of App Center Test, there may be other testing frameworks you can use; but that gets more into individual developer opinion which strictly speaking is out-of-scope for Stack Overflow answers.
Appium Studio which holds all the pros of native Appium. It also supports parallel execution with built-in test reporting mechanism. They also provide cloud devices with which you can check whether it is feasible for your project. Check out their documentation for more features.

OpenGL fails to render on windows 8

I am encountering an issue where nothing is rendered when running a simple OpenGL application through VS 2012 on Windows 8.
I had a little debug renderer I was using to prototype some projects and had it up and running on Windows 7 using VS 2012 Express Edition.
I upgraded to Windows 8, and cloned the git repository with my work on. After installing the latest drivers and installing VS 2012, I ran my application, but nothing displayed, all I get is the screen clear colour. I was getting an exception before but that's because I didn't have the right drivers so when calling glGetIntegerv(GL_MAJOR_VERSION,...) I'd get -1 as OpenGL wasn't set up correctly. It is initialised correctly now and when stepping through, it looks like everything is working fine, the only problem is I'm not seeing anything.
To make sure it wasn't just my code I downloaded some of the Swiftless OpenGL examples and got the exact same thing. My application was using OpenGL 3.2 and no deprecated functionality. My hardware can support up to 3.3, and if it is of any use I am running Window 8 through Boot Camp on a Macbook air.
I have been bashing my head against a wall for the last couple of days trying to solve this but I'm not having much luck, I thought I'd throw it out there to see if anyone has had a similar problem, I'd be really grateful if anyone can offer any information. If someone with Windows 8 could download and build a simple OpenGL application though VS just to see if they can get something up on screen that would be interesting!
Do you use the good old and deprecated fixed function pipeline, namely immediate mode draw calls like glBegin(), glVertex*() and glEnd()? If so, try to draw your stuff using vertex arrays. Even if this doesn't help in your specific situation, immediate mode draw calls should be avoided at all cost to make the code forward compatible. The OpenGL 3.x core profile doesn't contain these old API functions anymore. I had also a blank screen on my new Win 7 notebook (OpenGL 3.3) because of some stale immediate mode draw calls (FTGL).
EDIT:
For independent GL debugging, I recommend this:
http://www.gremedy.com/
This program allows you to pause the execution and investigate buffer contents, shader programs and more.
After installing the latest drivers
Where did you get the drivers from? Only drivers you download directly from the GPU vendor's website ship with proper OpenGL support. The drivers automatically installed by Windows have only poor OpenGL support.
opengl support is not available for windows 8.their are still techniques to use it on windows its better to search on google coz i tried for minecraft game or u can check here too

FPS Drop after upgrading to XCode 4.3

I'm hoping someone else has experienced this and subsequently found a solution as I am about to light my own hair on fire in frustration.
Simply put, I was creating a Cocos2D app using XCode 3.2.6 and SDK 4.2. I used two devices for testing: iPhone 3GS and iPhone 4, both at IOS 4.2, I believe. When testing on either device I was getting solid 60 FPS performance.
The disaster first hit when I upgraded to XCode 4.2. With no trouble I was able to open my project directly into this new version and run it. Everything is the same except that I am now in XCode 4.2. To my shock and horror I found that I was now getting FPS in the 45 to 50 range, and it will drop into the 30's at times, none of which ever happened before.
At this point I decided to upgrade to Lion, XCode 4.3, and SDK 5.1. Unfortunately, this changed nothing.
I then upgraded both phones to the latest IOS, and still the performance problem continued.
Finally, I upgraded to the latest version of Cocos2D, but to no avail.
I have tried a number of remedies that involved release versus debug modes, compiler settings, etc. Nothing helps.
I found something that might be a hint, but I do not know enough about Open GL ES at this time for it to make a lot of sense. On another forum someone had complained about the very same problem and said that if they disabled Vertex Buffer Object (VBO) support, it resolved the problem. I found where this is enabled within Cocos2D, disabled it, and to my surprise I was back up to 60 FPS. The app does not perform as strong as it did when compiled under XCode 3.2.6, but it is much better with VBO support disabled under XCode 4.3. The problem with this is that disabling VBO support is not recommended as it is suppose to enhance performance when enabled.
Some of the testing I have done seems to point to graphics being the issue. When the app does drop into the 45 FPS range all I have is 12 to 20 sprites moving on the screen. If I remove these sprites and allow everything else to continue operating, I get back to 60 FPS, even with VBO enabled. When I was developing under XCode 3.2.6, I at times would have 100+ sprites moving along (both in view and out) and the the FPS remained at 60.
So in short (sorry, too late for that), does anyone have any idea how the exact same code would run great when compiled through XCode 3.2.6, but rather badly under XCode 4.3? I have tried many different compiler settings to no avail. My guess is that there is some simple setting somewhere that perhaps defaults to a different value between XCode 3 and XCode 4.
I'm desperate, so please pass on any ideas you may have.
Thanks!
Is it possible you let Xcode update your project settings? Have you rolled back to a known good version from before Xcode 4.3 was released and verified that it is slow?

Is Xcode 4 ready for iOS development or still too beta?

I am just starting iOS/iPhone development and I would like to start using XCode 4 instead of XCode 3.2. Is XCode 4 stable/feature complete enough for beginning iPhone development or should I stick with XCode 3.2?
I have run into far too many problems using beta versions of XCode, especially since you can't really have two versions of XCode one the same system. Apple already has a history of releasing things to developers before they are truly ready (just look at iAds for the iPad which were released months ago and have yet to deliver a single ad). So, if even Apple isn't ready to label XCode 4 as ready-to-go then you can rest assured its not really ready to go.
I recommend sticking with 3.2. That's what I'm doing until XCode 4 is officially supported.
Using XCode 4 calls everything you do into question. Having a problem with an API? Maybe it's XCode, maybe its your code, maybe its a bug in the API. You just don't know.
I would say no, it's not ready. I tried using it as my main development environment for about a week, and eventually switched back to 3.2. For one thing it crashed fairly regularly, but I could get passed that.
The big thing that caused me to switch back was a bug where the iOS simulator would think that certain resources existed in my app that didn't. Deleting the app from the simulator didn't work, cleaning the project didn't work, and deleting the derived data folder didn't work. Since it's not officially released, finding help for problems like this is a pain as well.
This is just one instance of the kind of problems you'll run into while using it, so I'd recommend avoiding it for now.
You can use Xcode 4 if you do not plan on using the current version (Preview 6) for submitting apps to the App Store.
iOS Dev Center:
Xcode 4 Developer Preview 6 includes
iOS SDK 4.2, bug fixes, and additional
features. To compile submissions for
the App Store, continue to use Xcode
3.2.5 and iOS SDK 4.2.

Do I have to compile my iPhone app with 4.2?

I have iPhone application in the App Store. Do I have to compile my app with iOS 4.2 SDK in order to allow it run on iOS 4.2 devices? Or compiling using iOS 4.2 is required only to allow using new features of new iOS?
I will appreciate if you can clarify this issue...
Thanks!
Yoash
Do I have to compile my app with iOS
4.2 SDK in order to allow it run on iOS 4.2 devices?
No, it will run on the new firmare just fine. At least if the new firmare does not reveal some bugs in your code (which happens).
You don't need to recompile it to let it run on newer OS versions, but like you already guessed, you need to recompile it when you want to use the newer features (eg. AirPlay, "Multitasking" etc).
The old version should still run.
The app might not play well with new features like multitasking on iPad, so it is worthwhile trying to get some testing and feedback done as soon as you can in case there are issues.
If you download the XCode 4 pre-release from the developer portal, you can use the new static analyser to look for problems in the code: this is not just for SDK issues but also things like memory leaks.
Apple recommends that you always compile with the latest SDK, even if you are targeting older versions.
Unless you run into a specific issue that is causing incompatibilities, it is wise to take this advice. A lot of small bugs and performance issues are fixed with each new iteration of the SDK.
That being said - you can continue to use the older SDK's, and Apple will still accept the apps you build. For mature apps that are only going through minor tweaks, this is probably the safest course to avoid introducing new bugs.

Resources