UIKeyboardTypeDecimalPad for currency field in 4.3 iphone sdk - iphone

I am not able to successfully use UIKeyboardTypeDecimalPad when i run on simulator 4.3 and it successfully works on simulator 5.0. I have currency to be filled in textfield.
How can i use UIKeyboardTypeDecimalPad for device running 4.3 ?
Edited
in simulator 4.3 it is giving following warning:
"Can't find keyplane that supports type 8 for keyboard iPhone-Portrait-DecimalPad; using Default"

I think it's a warning because i am using IOS 4.3 and it's printing that error in Logs and working perfectly.I am using following code
- (void)viewDidLoad
{
[super viewDidLoad];
myTextField.keyboardType=UIKeyboardTypeDecimalPad;
}

simulator autocorrection was called which crashed my app..
it is Lion 10.7.2 + Xcode 4.2 + Simulator running iOS 4.3 problem
Now solution to it is
We have to update Simulator 4.3 , by following this steps: 1) Go to Xcode->Preferences->Download 2) Update iOS 4.3 Simulator
And Reset Simulator ,and run it again... its done...

Related

iOS 9.1 Simulator problems

I developed an iOS app on Xcode 6.3 with iOS 8.3 .
Now I update Xcode to 7.1 with iOS 9.1 .
My app work perfectly on iPad with iOS 9.1
and all the views work perfectly in iPhone with iOS 9.1 expect one view .
With iphone 4s , 5 the problem is (lldb) with EXC_BAD_ACCESS(Code = 2 ,)
With iphone 5s , 6 , 6 plus , 6s , 6s plus no error message but the simulators hung all the time with max cpu and ram usage.
note : the implementation of view that causes the problem the same with iPad but in iPad work perfectly .
Please what the true analysis for the problem ?
There is a bug in Xcode 7.1 with UITextView , this is stupid bug.
You don't need to ensure that the UITextView holds at least 10 characters. Just adding a default of at least 10 characters to the UITextView in Interface Builder will fix the problem. Then, you can empty the UITextView using code.
this issue comes sometimes if u migrate from xcode 6 to xcode 7.. clean the code and check if the base sdk is proper.
sometimes this issue also comes in simulator. try running the app in real device.
Also, see if xcode 6 and 7 are not running simultaneously. run only one at a time.
Hope this helps u

How to switch from Xcode 4.1 to 4.5 for iOS 6.0

I just moved from Xcode 4.1 to 4.5 in order to supporting IOS version 6.0.
I modified launch image as 640x1136 pixels and Base SDK is iOS 6.0.
The problem is when I launch the app it throws SIGABRT on main.m and I added exception breakpoint to get more information but It gave breakpoint 1.1 on the same line of the implementation.
However I have noticed that I got a new warning with Xcode 4.5. Warning and Code are written below. Thanks for help.
Warning:
Semantic Issue: 'CountrySettingsViewController' may not respond to 'initWithTitle'
Code:
CountrySettingViewController *countrySettingView = [[[CountrySettingViewController alloc] initWithTitle:NSLocalizedString(#"selectCountry",#"Select the country title")]retain];
I'm not yet ready to jump to xcode 4.5. - because, then a lot of old projects will have to be recompiled e.t.c.
In order to support iphone 5 display, I simply made everything autoresizing, extra checking for iphone 5 display (to set corresponding image), and added iPhone 5 splash screen image. Compiling from 4.4.1, and on iPhone 5 it will look ok.
I then copy installed application from 5.1. simulator to 6.0 simulator, and launch 6.0 simulator, to check how it will look on iPhone 5 (while I don't yet have any iPhone 5 to test).
Hope that helps.
(I have 4.4.1. sdk and 4.5. sdk installed)
But about that error -
is this "initWithTitle" function declared in .h file also? Or else other classes will not see it (even if it works).
Finally, I sorted out my problem from the following answer in link:
iPhone with iOS 6 and Xcode 4.2 issue

iphone simulator not showing in xcode 4.2?

I have been using xcode 4.2 for last 3 months. For last two days it is not showing iPhone simulator .But when we change the device option in iOS simulator to retina display it is showing the simulator .i didn't change any settings of xcode.
As I experienced, in Xcode in the circumtances when the target of the Simulator is iPad but your sample code is in iPhone or the sample code(project) you are trying to compile has been compiled in an old version of iOS (or Xcode) the Simulator doesn't give response. But it still compiles the project and saves it to the main page of iPhone(iPad) simulator.. What you need to do is just compile an iOS 5 project and from main page see your app in Simulator

UIModalPresentationFullScreen gives error in UniversalApplication

i am created Universal application, in that i used UIModalPresentationFull, for displaying MFMailComposerSheet in iPad, which helps me to show the full screen of a MailComposer view in landscape view of ipad. When i run the application in ipad simulator i works well. If i set it to iPhone simulator 3.0 or 3.1.3 it shows the error like "error: 'UIModalPresentationFullScreen' undeclared (first use in this function)" when i comment it and run in iPhone simulator it works what would be the solution for this error or, else is that any method replaces "UIModalPresentationFull" works in both ipad and iphone?
Thanks and regards
Venkat
UIModalPresentationFullScreen is only available in the 3.2 (and above) SDK so you can't compile it with a SDK lower than that.
However, you don't need to for a universal application - you compile it against the highest SDK you are going to run on and then you have to check at run-time if the methods / classes you are using are available. You set this in your build settings : Base SDK should be set to the highest SDK you are using (probably 3.2 for the iPad) and iPhone OS Deployment Target should be set to 3.0 - the lowest SDK on which your code can run.
You should be doing this each time you use a 3.2 only bit of code :
if ([controller respondsToSelector:#selector(setModalPresentationStyle:)])
[controller setModalPresentationStyle:UIModalPresentationFullScreen];
Then, even though you have compiled against the 3.2 SDK, when you run it on lower SDK devices, this method will not be run.
I test this on an iphone that still has 3.0 SDK on it. I don't know exactly how you would test in the simulator with a lower SDK sorry.
enter code here
Using conditional compilation block we can isolate the process for iPhone and iPad
" #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 "
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// The device is an iPad running iPhone 3.2 or later.
if ([picker respondsToSelector:#selector(setModalPresentationStyle:)])
{
//picker.modalPresentationStyle = UIModalPresentationFullScreen;
[picker setModalPresentationStyle:UIModalPresentationFullScreen];
}
}
" #endif "
Please remove the quotes and use that if and else part too...(i.e)conditional compilation block

Setting Xcode's target to iPhone NOT iPad

I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have not been able to get the app to launch in the iPhone simulator - it keeps launching in the iPad simulator. I have tried option-clicking the drop-down menu in the top left-corner of Xcode and setting 'Active Executable' to iPhone simulator 3.1.3 but it keeps going back to iPad simulator instead.
What gives? I have no interest in my app running on the iPad and I don't want to test it in the 2X mode in the simulator.
Thanks,
You can't really launch an iPhone app in 3.2.x - sometimes it will pop up - but basically right now it is only for iPad development.
Update for release version of Simulator.
First of all, the title of this question doesn't match the description: Xcode target isn't the same as the simulator hardware device.
If you are writing an app targeting 3.2, it can run on both iPad (using OS 3.2) and lower OS versions on the iPhone. You do this by setting the Base SDK to iPhone Device 3.2, the Targeted Device Family to iPhone/iPad, and the iPhone OS Deployment Target to 3.1 (lower than 3.2).
The iPhone simulator has a menu option for Hardware->Device, which can be set to iPhone or iPad. However, you can only run a 3.2 SDK target in iPad mode, and a Universal app that supports iPad can only use the 3.2 SDK to build.
You can of course set the simulator to iPhone mode and launch your app from Springboard, but that will lose the debugger connection. Switching mode during installation of your app will cause it to crash.
So the short answer is still the same: you can't run a Universal iPad app in the iPhone mode simulator while debugging.
Upper-left corner of the IDE find a dropdown list of Simulator versions - flipped to 3.2 - try to put it back to 3.1.3
and relaunch your app.
This was driving me nuts too, but the answer is right here:
http://quatermain.tumblr.com/post/517122761/running-universal-ipad-iphone-apps-in-the-simulator
In short, tell Xcode to Build for the 3.2 SDK, then switch the build menu to the 3.1 SDK and tell Xcode to Run the app. Presto, the app starts in the iPhone simulator!
From Apple's documentation: "iPhone OS 3.2 does not support iPhone and iPod touch devices. It runs only on iPad." There's no way to target 3.2 for iPhone, so there's no Simulator. Ergo, you'll have to wait for iOS 4. Fortunately, that's only 4 days away now... of course it won't support the first generation of iPhone devices, but for all other iPhone users it's a free upgrade. Not sure about iPod Touches.
You should be able to change your target platform in your Project Settings.
Changing the target platform and device makes no difference. It always launches the iPad simulator.
If you switch the simulator to iPhone mode, the app just disappears.
This dev environment is a mess.
Short answer: You can change the hardware setting in the simulator. Hardware->Device
Go to Project
Set Active Executable
There are 2 options: Ipad Simulator 3.2 or Iphone Simulator 4.0.
If you choose the Iphone simulator, then it will launch Iphone simulator.
If you choose the Ipad simulator, then it will launch Ipad simulator.
I finally solved this problem myself.
First, install new version of xCode, which is xCode 4.
Then set project scheme to iphone simulator and run app in xCode several times.
And re-install xCode 3 and the problem will be gone away!