How to let my application support iOS 4? - cocoa-touch

I tested my application on 8GB iPod Touch using iOS 4.0(within multitask), it works. But when I change my original source code, and built it in the simulator. The application load, but nothing appear, it all dark. What I should do to solve the problem? I check the console, it didn't show any error msg. Thank u.

In the Simulator, check the Hardware->Device and Hardware->Version settings. Also, try setting a breakpoint in your code and stepping through it to see how far it gets.

Related

How to simulate the status bar in Codename one?

I am currently trying to get a local notification to work on an example app. I was following the simple guide here and just copied its code to see it working:
https://github.com/codenameone/codenameone-demos/blob/master/LocalNotificationTest/src/com/codename1/tests/localnotifications/LocalNotificationTest.java
However, in the simulation, I cannot see any changes in the status bar. Is the status bar even simulated or just a static image? Do I have to build the app and send it to an actual device every time I want to test it? That would not only be tedious but also crunch on the available monthly builds.
Is there a setting in the simulator to activate this that I missed?
Thanks and best regards
Local notifications happen in the background which isn't supported by the simulator so this is something you will only see on the device. You can simulate the minimizing of the app (pause/resume) but the Codename One simulator is not a full mobile OS simulator.

App crashes on iOS (Phonegap) if multiple images are captured from camera

I am developing Phonegap Application and my application has scenarios where camera is used very frequently.
In my application I have used custom camera plugin (https://www.npmjs.com/package/cordova-camera-custom) to take picture and use it in my application.
Now when I capture images from this camera 30 times by opening camera and capturing again and again the app goes to crash.
The app just crashes so I am not able to identify the root cause of the crash.
I am not an iOS Programmer though I have tried to check the plugin code but I was not able to find the cause.
You can even check the plugin code on your end if needed.
I have also posted this issue to DevExtreme, the framework which I am using to develop hybrid applications at following link:
https://www.devexpress.com/support/center/Question/Details/T480068
and they found that issue indeed is related to memory shortage. The error message was with bug_type: 298 and fault cause: vm_pageshortage.
Please help me on this, I am struggling on it since long before.
Any Help is greatly appreciated.

"Cannot Adjust current top of stack beyond available views" - Error only when Debug in Chrome is turned Off

I'm having an issue where I get the above error, but only when on my hardware ios device, or emulator debugging is turned off. IF it is on, it works fine in the ios 6 simulator.
Any ideas?
I found the answer.
Interestingly, React-Native seems to use a different version of Javascript when the debugger is on. I was trying to use a ES5 function for formatting text as currency, and it worked fine as long as the debugger (and browser) are on. However, turning this off forces react-native to use their specific javascript core which did not support that javascript function.
I fixed it by using a different function. The error should be more specifc to explain you are doing something illegal.

XCTest UI Record and Play - Simulator not updating UI

Apple released a new UI Testing framework 2 days ago during WWDC2015. I'm trying to write a test case and when I try to record the UI testing, to generate the scaffolding code, it looks the code is being generated, however the UI on the simulator is not actually updating.
i.e When I tap on a button, the code is generated to actually find the button and tap, but the button is not actually tapped simultaneously on the simulator.
So basically I'm not able to go to the next screen on the simulator, to actually proceed in the test case.
The WWDC session video showed an example of an iPhone app (Lister app). But I'm trying it on a iPad 2 app. Thats about the only difference.
Any clues about why this might be happening?
Wanted to check if there has been other instances of these before actually filing a Radar with Apple.
I was able to fix the issue.
The problem was, in the "deployment target" section in the main Application target, there are different columns for all the targets listed.
For the Application's UI test target, the target was set to iOS8.
Changed it to iOS9 and it started working.

GCD crashes in iOS5

I am developing a Static library.
And i am using reverse Auth in the library using source code from here.
In this library, the following crashes in iOS5, but works fine in iOS6.
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)
If we change the line as follows, it works fine in all OS versions.
dispatch_async(dispatch_get_main_queue()
Will the change work in all circumstances or will it create any problem?
Please advice, Thank you.
It's hard to tell without being able to see your code, but this sounds like you are sending a message without your GCD block to an object created before the block and that is no longer alive at the time the block executes. I suggest setting as a property to retain it so ARC doesn't get it collected.
The discrepancy between iOS versions could be due to differences between the simulator and the device (you said you run the iOS 6 version on the device, and 5 on the simulator).