Using weinre to debug an cordova iOS app - ios5

I'm looking for a way to debug a cordova app running on iOS. Will weinre work with an app that is already compiled ?

Weinre will work. Personally I do not like it that much. It keeps doing ajax call making performance poor. The idea itself is great.
Xcode 4.3 - use iWebInspector: http://www.iwebinspector.com/ - you will need to install an other chromium version though.
Or get Xcode 4.5 - it has an integrated remote debugger. Warning - you are not allowed to compile using Xcode 4.5 for the appstore.

Related

iOS 6 WebDriver compilation

I tried to compile Selenium WebDriver for iPhone 6.1.3 and got some errors, like
Objective-C declarations may only appear in global scope
in HTTPVirtualDirectory+FindElement.mm file.
I use XCode 4.6.2 , iOS 6.1 SDK and WebDriver sources from https://code.google.com/p/selenium/
Someone compiled WebDriver for iOS6 successfully? Had you same problem?
Also, if you have any useful information about automated web testing on real devices (iPhone with iOS 6) please, share it with me =)
I have not used the iOSDriver but it is now deprecated in favor of something else, specifically the ios-driver created by a third party:
http://freynaud.github.io/ios-driver/
I would set that up, come back if you have any further questions.
Go to https://code.google.com/p/selenium/wiki/IPhoneDriver
take trunk from https://code.google.com/p/selenium/
Add project from trunk to Xcode
In Xcode Build and run thorugh Iphone 6.1 Emulator
P.S i think that will help you

Aspen Simulator not working

I have googled for two days and still no luck. I am running a Mac OS X 10.5.5 and the iPhone SDK 3.1 beta, running the Aspen Simulator.
My problem is that I can not get any app to work on the Simulator. It builds alright but the simulator shows a black screen and then returns to the main menu. I get this error on Xcode:
Error from Debugger: Failed to launch simulated application. See console.
and in console, it says something about "unable to find springboard (bootstrap lookup error".
Can you please help me?
I think you should think about updating your system. Using an old iPhone SDK 3.1 beta nowadays is really strange, you should update to the latest stable iOS SDK 4.3.3 and test backwards compatibility of your app using the built in iOS SDK 3.2 from iPad. This will help you test the app on this older SDK while getting active support from both Apple and developers.
Tell me if updating solves your issues or not. Thank you!

iOS 4.3.1 on the phone - does it work with XCode 3.x ? or only 4.0.1?

I upgraded my iPhone to the latest OS (4.3.1) yesterday, and noticed there is no corresponding XCode 3.x release, only a 4.x release (4.0.1).
Since upgrading I am getting warnings when I try to install apps on the device using my development certificates (Application failed codesign verification).
Not sure if the OS upgrade on the Phone and the error message are related, so I'm just asking the question if anyone else had this happening?
And are we supposed to use XCode 4.0.1 when we develop for the 4.3.1 iOS release or can we use a 3.x version as well?
The Xcode version number isn't important, but the SDK version number is. You can get the latest SDK with either Xcode 3.2.6 or Xcode 4.0.1 at the time that I'm writing this.
You can still download the XCode 3.2.6, it goes with the SDK 4.3, and it is free to download.
You can try with XCode 4 as well, but you have to either to have an iPhone or Mac Developer account (99$/year) or you need to buy it from the AppStore
It still works, however of you first attach your iPhone to Xcode it will ask you to download the debugging symbols off the phone. Answer Yes to this question and you are ready to go.
However there is one more thing: usually Apple makes restrictions about the SDK you should use when submitting apps to the store. So if you want to submit an app it could be that you have to use the most recent SDK.
Deploying an application directly from XCode 3.2.6 on a device where iOS 4.3.1 has just been installed won't work.
First, you need to open XCode's Organizer window and ask to collect information from the device. Then it will work fine.

Problems running application compiled with XCode 3.2.4 and iOS SDK 4.1 on iOS 3.x

I recently ran into troubles building an app with latest iOS 4.1 SDK and running it on device with iOS 3.x. App works OK on 4.x devices and iPad, but crashes on devices running older 3.x iOS.
Problem appears to be in linker, since crashes are obviously caused by calls to 3rd party libraries used in the project. The linker (or even compiler) suspicion is supported by fact that when I build the app with older 3.1.3 SDK, it works as expected.
My Release configuration uses iOS 4.1 as Base SDK and iOS 3.0 as deployment target platform, compiled with LLVM GCC 4.2. I also tried GCC 4.2 compiler, but it didn't help too.
I've found that there's some bug in linker/compiler in this version of SDK, but none of proposed solutions worked for me.
I desperately need to resolve this issue, so any help is highly appreciated.
Thanks to everyone for any hint or advice.
Just to let you know that if you are using something like iAd framework, you need to add this framework as "weak dependency" in the Target Info Pop-Up :-)
If it's a librairie, could you list them ?
Good Luck !
I guess I am too late at answering this one. But still - If you have the 3.1.3 device with you, doing an in-system debugging by loading an app with a developer profile gives you what caused the crash. I faced a similar problem when my apps used to work fine on the 4.0+ devices but used to crash immediately upon startup when I tried it on 3.1.2 device. I compiled it with a developer profile and then did an in-system debugging. I found out that I was using a class UIPopoverController which was brought in with iOS 3.2 and hence used to fail for my 3.1.2. Putting in the necessary checks for this resolved my problem.
Hope that helps.

iPhone OS Deployment Target after update to iPhone SDK 4

I just updated to iPhone SDK 4 and am trying to debug on my device with 3.1.3 installed. Before the update, I compiled with Base and Active SDK set to 3.1.3 and all was well. After the update, I'm limited to SDKs 4.0 and 3.2--setting the base to 4.0 and iPhone OS Deployment Target to iPhone OS 3.1.3, I'm able to build and install on my 3.1.3 device, but receive the following error:
Error from Debugger: mi_cmd_stack_list_frames: Not enough frames in stack
I'm not using anything specific to the newer SDK, as I haven't touched a bit of code, just updated the SDK/XCode. So what am I doing incorrectly? The application runs as expected on an iOS4-installed device. Are there changes to pre-existing API's that need to be weakly linked perhaps? Thanks for all help.
Have you tried removing the app completely from your dev device, doing a build -> clean all targets, and then build again to your device?
I found this answer on macforums. If it's correct, then you probably have a memory corruption problem in your app that is confusing the debugger. Perhaps over-releasing something somewhere.
This probably isn't related to the SDK you are compiling with. It's possible you had this problem in your app all along but it just didn't show up until things moved around with the new Xcode, SDK, etc.
EDIT - I just ran into this problem myself trying to update an older app of mine to 4.0. It would run fine in the simulator and would install and run on the device except it wouldn't run in the debugger on the device. Anyway, I finally decided it was the .xcodeproj file that was corrupt or bad in some way and created a new project, copied over my source files to the new project and now it all works again. It's a pain but it only took about 20 mins to duplicate all my settings and I spent a couple hours trying to get the debugger to work.
Myself (and probably many others) are concerned about "will I still be able to compile/install apps for v3.1.3 of the iPhone OS?"
And what version of xCode does it become IMPOSSIBLE to ever write v3.1.3 apps again?
(Without installing a second copy of an older version of xCode.)
I've read the mile-long document that Apple wrote on the subject... but it sure would be simpler to understand if they just LISTED the various versions of each... instead of writing long paragraphs.
If you have:
Mac OS version 10.x.x x
xCode version x.x.x
SDK version(s) x.x.x
you can produce apps for iPhone OS x.x.x through x.x.x?