iPad version crashing - iphone

I am new to iOS development. I was opening the .xib file in the editor and tried to make an iPad version of the app. I went to File > Make iPad Version. An iPad UI appeared. I closed it and didn't save it.
The problem now is that the app is now crashing when viewed from an iPad.
Thanks!

Here's an official answer or, to be more precise, a couple of useful tips from someone who is also new to ios development (4 months):
First of all, update your xcode version. If you are new, there is absolutely no point in starting with an older version. True, it may have a bit more tutorials but it's not that hard to find stuff for xcode 4. Trust me, been there, done that ;)
Second, if you run your app on a device and it crashes, you will get a crash log. Connect the ipad to your pc and open the organizer window from xcode. There, go to Devices and select the logs for your device. The log will help you detect the cause of your problem.
Third, when you will encounter more problems like this in the future, be more detailed when asking for help on stackoverflaw. Post more info, error logs, print screens, etc. Basically, anything that could help others help you

Related

Newbie: Errors in an iPhone app

I'm really newbie in iOS and I have to handle a complicated situation. I was given an iPhone app developed by someone and I have to make it work. The guy who developed it has told me that it worked, but sometimes crashed in an iPhone. I've never developed using iOS and I don't really know how this app works.
Well, when I open the app with Xcode, the first problem that I detect is some errors with the references. The app uses the project CorePlot-CocoaTouch.xcodeproj. I've added again this project and solved the references (I've followed some other posts like this one: http://www.jaysonjc.com/programming/pie-chart-drawing-in-iphone-using-core-plot-library.html).
I want to test it with the simulator (I don't have an iPhone yet). I have a doubt here...should I use iOS Device, or iOS Simulator as Base SDK? Firstly I chose iOS Simulator, but it appeared a problem with Cocoa.framework (it turned into red).
Anyway, using iOS Device as Base SDK, I build the project and it says "Build failed (59 errors, 3 warnings)". I check out the errors, and most of them are "Expected specifier-qualifier-list before ..."
Can anyone help me? This is more or less the situation, but I can provide more specific details if they're needed.
I'm sorry if I'm talking about something really basic, but I've been trying to solve it for 2 weeks and I give up. I've tried to talk to the guy, but he's not really helpful..
Thanks for the replies!
By the way, I didn't say it and I don't know if it's relevant or what it means. The guy has a directory called "Libraries" where it's stored the CorePlot. The files there are the same than if you download the CorePlot project from other source. The only exception is a folder called "SDKBuild", which contains files like "build.sh", "iphoneos-SDKSettings.plist" or "iphonesimulator-SDKSettings.plist". I'm really newbie, so it's probably obvious, but I have no idea...
just try to add CocoaTouch framework to your project.
and for base SDK use "latest iOS".
Right click on the project name in 'group & files' set on the left of xcode. Choose add -> Existing Frameworks.
Find Cocoa.framwork and click add. Do this to all red colored framework.
Choose IOS Simulator as base SDK.
Try run it..
If you want to run the app on simulator, you have to build with iOS simulator. The base SDK basically sets the OS version (this will be the same regardless of whether you are running the app on simulator or device). You should be chaining the build settings to device only if the device is connected and if you have installed the appropriate provisioning profiles.

Help adding a live device to an Xcode 4 project

Argggh, I have built a couple Apps in Xcode 4 but I cannot remember/find how to add my live device to my schemes drop down. I have the simulator options, but in the newest project I created I do not have my iphone listed.
Can anyone tell me what I forgot to do??
Thanks in advance for any help!!!
EDIT: Any new project I create does not create anything for my Device, however, some of the sample apps I open have my device listed... there are a lot of developers out there... hopefully someone has had this issue and can shed some light on what I am not understanding.
I solved my own problem. I forgot that my device is ios 4.2, so to make it work in xCode, I need to change the deployment target to the correct ios version and it works as expected.
I've never had to do anything special, just plug the device in. After about 30 seconds or so it will show up as an option in your target list.

Fail with AdHoc distribution for iPhone 2G

I have some issues with my application. So, first time I have deployed the application for AdHoc distribution everything went well on my device and on my tester device (iPhone 2G).
Now when he starts the new build on his device he is seeing the splash screen and after this the app crashes. The only thing changed on this new version is that I have added some new feature to the app, but nothing on the first screen. My iOS version is 4.3, xCode 4 and iOS SDK 4.3 and my tester has an iPhone 2G and iOS 3.1.3. The target for the app is set to 3.1.2.
I have included the following frameworks:
1) libz.1.2.3.dylib;
2) libxml2.dylib;
3) MobileCoreServices.framework;
4) CFNetwork.framework;
5) UIKit.framework;
6) CoreGraphics.framework;
7) QuartCore.framework;
8) SystemConfiguration.framework.
Could one of them be the cause? How can I find out what frameworks are available for, let's say, iOS 3.1.3? Currently all frameworks are set to "required".
Do you have any idea what could be the cause of this issue? I will post the code for the first screen if you find it relevant.
Thank you,
Andrei
You'll need to inspect the logs on your tester's device to find the cause of the crash. The console log may provide some help -- your tester can retrieve the console log by using the iPhone Configuration Utility that Apple provides. It can be downloaded from http://www.apple.com/support/iphone/enterprise/ for both OSX and Windows. If your tester downloads and runs this, it will give him a view pretty similar to the Organizer window in Xcode. Have him click his device on the left-hand side, and then the "Console" tab, and then save the log and send it to you.
The other thing that might (more likely) help is the crash log. If your tester connects to iTunes and does a sync, the crash log is copied to his computer. It can be found in
~/Library/Logs/CrashReporter/MobileDevice/<DEVICE_NAME> for MacOS
and either
C:\Documents and Settings\<USERNAME>\Application Data\Apple computer\Logs\CrashReporter/<DEVICE_NAME> or C:\Users\<USERNAME>\AppData\Roaming\Apple computer\Logs\CrashReporter/MobileDevice/<DEVICE_NAME> for Windows.
Hope that helps!
If your app is crashing on startup, you'll need to gather his crash logs and read those. There's a million ways an app could crash; we'd need a lot more information to help you diagnose the problem.

iPhone dev question: "No provisioned iPhone OS is connected" error, I don't know what else to try for troubleshooting

I am trying to compile and install my first application onto my iPhone after setting up a profile and certificate. At this point I am getting the "No provisioned iPhone OS is connected" error when I Build & Go.
I am using iPhone OS 3.1.3, and Xcode 3.2.2 on 10.6.3.
• I have verified that my iPhone is connected to my development machine (it is seen on the computer by both iTunes and Xcode Organizer (in Organizer, it has the green dot next to it)).
• I have rebooted the iPhone and restarted Xcode multiple times.
• I have verified that the Bundle Identifier in my appname.plist is set to com.. (with the appropriate values between the angle brackets).
I have looked the error message up on the web, and so far have not found a hint that has gotten me over the hump....
Thanks for any and all assistance!
Regards,
Steve O'Sullivan
Open Organizer (in Xcode > Window >
Organizer) check whether there is a
green dot next to your iPhone.
Click on the iPhone item, check whether it's ready for development (if "Use for development" is there, that means not)
Sometimes, you may need to power off then on your iPhone
Did you add the UDID of the device to the relevant provisioning profile on the Apple iPhone developer portal, and downloaded and installed the new profile?
Maybe an answer now; see comment below. But if nothing else, an identical problem and question. I've tried all of the unique suggestions made on this and other forums, several times for some suggestions, as the original author has done, and I continue to get the same message. I've removed everything from the provisioning portal, from my iPhone (3.1.3), and from XCode (3.2), and rebuilt/reinstalled everything. As above, the green dot shows in the Organizer as does the relevant iPhone specific data, the provisioning file is there and on the iPhone, all the appropriate certificates appear to be in place. I've "clean"ed the build; I've turned the iPhone off and restarted XCode, in several different sequences; I shut down the development Mac and restarted everything. But, I continue to get the "No provisioned iPhone OS device is connected".
And, yes, this is my first try at loading a development application to the iPhone, so the original question's author and I seem to share similar relevant experience and behavior. I keep hoping to go back and find a missing step. And, while it did take several tries to get to this point, with everything looking like it's right, it appears I've still overlooked something important.
Beyond the "restart" suggestions, has anyone found any strong sensitivities to the order in which things are done, or anything that seems to have become more difficult with XCode 3.2 or iPhone 3.1.3? I notice that the many examples of this question first appeared 18 months ago, then it was silent for quite a while, and now there's been a slew of new queries of this kind.

code signing of iPhone application

1) i developed one application.. it is working fine in simulator. does it work in real
iPhone with out any modification..
2)
a) when i select in xcode projectmenu -> SetActiveSDK -> Device-iPhone OS 2.2 getting one
error. but i can't see what is the error, how to solve this ?.
b) if it is not working with Device -iPhone OS SDK, is it work on the real iPhone.?
pls help , thanx and regards.
Good job on your app. It's a good sign that it works in the simulator, but you never know if it will work on the device until you try. Some things will be faster on the device and many things will be slower. There are other differences. It's possible to have your app crash on the device but not on the sim, or the other way around. It's even more common to have memory leaks on one but not the other. XCode lets you debug on either and run the code tools on either.
Signing is a bit of a nightmare. It's easy to mess it up. Follow the instructions carefully. If you think you've messed up your project beyond hope, start a new project and move your source and assets over to it.
At some point you'll have everything working, then you'll turn off your computer or something and you'll get a message that you don't have a valid device connected. Reboot your iPhone when that happens.
Be warned that it's even hairier signing your code for the App store.
Just stay calm and keep trying. Also, ask on Apple's boards. Many people have gone through the trama and shared your pain. Good luck.