Can Applescript identify buttons of applications in the iOS Simulator? - iphone

I have to automate the testing for an iOS Simulator application using Applescript. I know that iOS Simulator is not a scriptable application, so i would like to know if Applescript can identify any information about a running application in the Simulator (i.e. Buttons of the menu - the application is not a flash one).
Thank you in advance.

If you want to perform automated testing of your iPhone application in the Simulator or on the device, I highly recommend using the new UI Automation instrument that came with the 4.0 SDK. It lets you create Javascript scripts that interact with the buttons and other accessibility items in your application's interface. It can test for correct operation of your interface, take screenshots (when running on the device), and be paired with other instruments for performance profiling.
I highly recommend watching the WWDC 2010 session video 306 - "Automating User Interface Testing with Instruments".
I also walk through how to use this tool in the "Testing" session of my fall semester Advanced iPhone Development course on iTunes U (that link isn't redirectly correctly right now, so just do a search in the iTunes Store for "advanced iphone development"). I have a sample set of scripts here that can be run against Apple's UICatalog sample application to show off how this works.

Related

Xcode M1: Run Designed for iPhone

Hello fellow [iOS] Developers!
I've just got my M1 MacBook Pro and been loving how we can test our Apps without even using our mobile devices (props to Apple!!)
So far, I was able to test the app behaviour as it was for iPad (Running "Designed for iPad"), so I wonder if there's a way to build the app as if it was for an iPhone and run it on the M1? This would be awesome!
Yes, You can.
One simple smart hack is to
uncheck iPad from Deployment info
and then simply run the app you would see that the text would change to
Detailed Steps:
Select Project from Project Navigator
Select your specific target > Go to General
Under Deployment Info "Uncheck iPad"
Bas ho gya, Khatam, Tata, Bye Bye
Just run the Project
The answer is no, you cannot, if you mean native iPhone app on the M1. At least as far as I’ve seen. The simulator will continue to offer you to run the iPhone apps, as you probably have seen already.
As far as I understand, however, iPhone-only apps available on the iPhone are an exception. Whenever an app contains both iPhone and iPad versions of that same app (universal iOS apps), Apple ignores the iPhone version and makes available the iPad version exclusively out of those two iOS/iPadOS apps.
You should watch the video by Apple, ”Introducing iPad apps for Mac”, WWDC 2019, available in the ”Apple Developer” app (you can find it on the App Store). Here’s a web link if you prefer it: https://developer.apple.com/videos/play/wwdc2019/205/
Here is a quote from the transcript of that video:
Now along those lines, there's also some apps that are just not
candidates for this technology.
One example is iPhone apps. iPhone apps are optimized for the smaller screen, so they're trying to take advantage of that small screen. We really want you to have an iPad app that's taking advantage of larger screen sizes before bringing it to the Mac.
In 2019, this was all about Mac Catalyst on Intel Macs, but I think it still holds true today on M1: it is all about taking advantage of the similarity between macOS and iPadOS in terms of the screen.

How to make iPhone app searchable when search from an iPad

I created an iPhone app and published to the iTunes. Now my client complainig when he search it from the iPad it doesn't display under iPad apps. He asked me to make it search under iPad also. Then how I can do this plz help me.
Thanks
You can find it if you tap the iPhone tab on your iPad. If you want it to show up under iPad apps, it has to be an iPad app (or a Universal app, meaning it is designed for both iPhone and iPad). If you are looking to optimize your app for iPad and make it a Universal app, here are some resources to get you started:
Apple's Advanced App Tricks Guide
Creating a Universal iOS App Tutorial
Creating a Universal iOS Application
If you go to Xcode and start a new project, and click "Universal", Apple will have most of the work done for you. You will also find that it is a lot more straightforward than it sounds; basically you use the same code with different nib files. If you need more advanced control, you can always detect which device you are running on to do stuff programatically.

Should I obtain a Mac to develop or test my iPhone web app?

I've been developing an iPhone web app on a Windows XP box using
MobiOne Test Center and Safari for testing and debugging and
occasionally using a real iPhone for testing. The problem is that
MobiOne, Safari (desktop), and the iPhone all produce different
errors. Obviously I am most concerned with the errors that occur on
the iPhone, since that is the target device. (An example of the type
of error encountered is that an image that ordinarily appears as
expected occasionally cannot be displayed, so the little question-mark
icon appears instead.)
I have the opportunity to obtain a Mac for development, but I need to
know whether using a Mac will make a difference.
Have any of you moved to the Mac for developing or just testing a web-only iPhone app?
Is doing so worthwhile? Why?
Does the iPhone simulator in the SDK simulate an iPhone better than Safari on the Windows desktop?
Is there a reason I would need a paid subscription to the Apple iOS Developer Program?
Thanks!
In short: no, I don't think a Mac is necessary for developing iPhone web apps, especially seeing as you have access to a device to test on, and you seem to be fine in your progress of development.
If you're not aware, there's a debug console available on Mobile Safari on your iPhone. Go to Settings > Safari > Developer (at the bottom) > Debug Console and turn that on.
When developing an iPhone web app, you do not need to pay for the iOS Developer Program. That program is for developing native apps to deploy either to your company or the App Store only.
Web apps, on the other hand, are nothing more than web sites that are designed (i.e. include certain meta tags, have mobile-friendly interface designs) to be run similarly to native apps on a device, and harness certain Web technologies such as geolocation that are available to devices. Users view them in Mobile Safari like any other web site, but for the best experience are asked to tap on the + sign and add your web app to their home screens to be accessed as such.
The iPhone Simulator certainly does a better job than desktop Safari on either Windows or Mac OS X since its user interface shares that of the iPhone device, but I don't think you'll need it for testing and debugging if you have a device to test on.
The iOS SDK has a tool called Dashcode but I don't think it's much of a difference from the web dev IDEs that the rest of us use every day. As far as I can tell, Dashcode doesn't give your web app any additional features that can't already be implemented using the standards we're familiar with.
I would not buy a Mac or a paid subscription to the Apple iOS developer program unless I was writing native iPhone applications.
You should be fine with your current configuration. Just make sure you do the bulk of your testing on the actual iPhone, that is what your customers will be using.
Does the iPhone simulator in the SDK simulate an iPhone better than Safari on the Windows desktop?
Yes - there are some significant differences between MobileSafari and Safari for Mac/Windows - but you've got an iPhone to test on. The iPhone Simulator offers no additional debugging tools for iPhone web apps, so you're not going to be better off having it available than just testing on the device.
Testing on an actual device is better than testing on any of the Simulators, since that is what you mobile customers will actually be using.
If you are strictly building web apps, your money might be better spent on more test devices (devices with and without a Retina display, iPad, maybe an old used iPod Touch running some prior version of iOS for regression testing, etc.) If you are choosy about your colors, the color can vary quite a bit across devices, so it may help to find one warm display and one cold one (from old/different manufacturing lots, etc.).
So you don't NEED a Mac (unless you have other reasons for acquiring one).
Buy an iMac. You will enjoy the experience better.
It is my understanding that your application needs to be compiled on a mac before it can be sold in the app store.

How can I test Xcode Project on iPhone?

I have developed a view based project in Xcode. It is successfully running in iPhone Simulator. But I want to test this project on real iPhone device to check the behavior of application.
Is there any way I can test my application on iPhone device without buying Apple Developer's License?
Thanks in advance.
No, there is not. You pay the $99, and you get the ability to load software onto (a few, I believe) real iPhone/iPods. See http://developer.apple.com/programs/iphone/develop.html#compare for details.
No, Dear you can't install any app onto the iphone without their(Apple) permission. YOu have to buy the Apple's Developer License. That's the bad news for you..
I would say you can borrow devices to test your app project developed using Xcode, it is also easy and simple you can also link as many devices to test your app. I did this for one of my game app.
check the link below for reliable discussion
Install iPhone application in my device
http://www.gamedev.net/topic/648853-do-i-have-to-have-an-iphone-in-order-to-create-and-test-an-application/

Installing iPhone App to iPhone

I followed the tutorial from this site:
http://theappleblog.com/2008/08/04/tutorial-build-a-simple-rss-reader-for-iphone/
to make my first iPhone application, now I would like to test this application on my iPhone, what steps do I need to take in order to do this?
You have two choices. You can register to become an iPhone developer like most people do on the iPhone Dev Center, and then deploy directly to the device by selecting "Device - iPhone OS 2.2" in the Overview menu and then hitting Build and Go.
If you're not using any 2.2-specific APIs, you can compile with "Device - iPhone OS 2.1" and then send your app bundle over to a jailbroken iPhone via SFTP, and fake the codesign process using the ldid utility, allowing you to mess around with your apps on the device without registering to become a developer, and without having the headache of installing the open toolchain.
Become a registered iPhone developer. You can't deploy to the phone without doing this first.
http://developer.apple.com/iphone/