Is it possible to load other applications in Instruments? - iphone

I’d like to use Instruments to peek at some third-party applications on my iPhone, is that possible? If I attach Instruments to some of the applications I develop, everything goes well. But when I try to load some other application, Instruments complain that they can’t “get task for pid XY.” Is that a security measure?

This is the iPhone telling you that the app you're trying to run won't let the debugger attach to it. Without a debugger attached you can't run Instruments.
This is an intentional security measure, withut hacking the 3rd party apps you will not be able to view them in Instruments.

Hey.
From Instruments documentation:
For your protection, the instrument does not allow you to process any application that is not
code-signed with your provisioning profile. This includes any copy that has been downloaded from the iTunes App Store.

Related

last steps before beta testing / submission to app store?

I'm a newbie. I've worked out all the bugs I can find in my app, but before I find beta testers and ultimately submit to the app store, I want to make sure I don't leave out any important steps. For example, I see several questions talking about checking for memory leaks, but I don't really know what that is or how to do it; same thing with the sandbox. I've already created a signing certificate and a provisioning profile and registered my device.
So: assuming that my code is all working, what else should I do or check for?
(If this isn't an appropriate stackoverflow.com question, I apologize; please let me know, and I'll remove it asap.)
Definitely check for leaks.
Leaks are where your app doesn't give up memory to the system after it has finished using it. This can mean (a) Your app uses more memory than it needs to and (2) the device runs out of memory if your app runs for a long time, and your app can crash and other apps will be closed.
Here's a guide to finding leaks, using a tool called Instruments that comes with Xcode.
http://mobileorchard.com/find-iphone-memory-leaks-a-leaks-tool-tutorial/
Also make sure you write 'review notes' for the reviewer if there's any aspect of your app that won't be immediately obvious. If you need a login to use the app, make sure you provide a test one in the review notes. Consider making a (private?) YouTube video showing the app in action.

Auto-updated iOS application for enterprise distribution

Is it possible to make an iOS application for enterprise distribution that updates itself transparently? Saying 'updates' I mean completely updating its logic.
A possible usage of this approach is a self-service kiosk (iPad) that is maintained remotelly.
It's not possible to update application binaries directly, but I see some possibilities:
Application that have a single UIWebView and the logic is implemented in HTML5. But we can't use most of hardware specific features that can be used in native applications.
Some multi-platform framework (possibly HTML5-based) that allows to use native application features and that is compiled or interpreted dynamically.
Jailbreak?
What are really working approaches of these?
Consider getting a mobile device management service. Those are pricey.
OR:
First, enable over-the-air distribution. It will take $300/year enterprise agreement with Apple. Set up a website with the app's IPA archive and descriptive PLIST.
Then code a call-home HTTP request on app startup. You may pull/parse the same PLIST that describes the latest version; it has a bundle version in it. Compare that to the version of the currently running bundle.
When a new version is detected, the app shuts down, opens the browser on the download page. In a softer manner, just notifies the user that an upgrade is available.
I've never tried linking directly to the app's download package, but give it a try. In a perfect world, Safari would open up and ask "Do you want do download MyApp?" right away. In a not so perfect world, the user would have to click a link and then agree to download.
I think what you are looking for these days is the "Apple Deployment Program".
You volume purchase iPads which get sent to people, but that you can manage remotely - which also means management including remote updates of applications.
The only thing I'm not sure of is if you can launch an app remotely, so that you could update and re-launch an application.
Here's a guide to enrolling devices for remote management:
https://www.apple.com/business/docs/DEP_Guide.pdf
An old but good summary of the program:
http://www.speirs.org/blog/2014/2/27/understanding-apples-new-deployment-programs
Also watch the WWDC video on Managing Apple Devices for the Enterprise:
https://developer.apple.com/videos/wwdc/2015/?id=301

iOS simulate Application and log events

I want to install and simulate iOS applications and find their malware intentions. See if connects to an IP address, downloads something, API call logs and soo on... kind of everything it does on the system. Does iOS Simulator log this events, or is there any online project that does that. If not then I should do it from scratch, do you have any advice how to do this? I only have the application file, not the entire Xcode project.
ALL i have is a bunch of applications(not the projects) that i have to test. All i want is to run them and log their actions in an automated way. Just like running a windows application on a virtual machine and log api trace, internet connections, memory, registry, disk actions... IN AN AUTOMATED WAY.
Thank you.
In the iOS simulator apps simply run on Mac, but their output is shown in the iOS simulator. This means that any tool that allows you to audit Mac applications will allow you to do the same with the iOS simulator.
Check your Activity Monitor, you'll see that the app is simply listed there. I think the standard Xcode Instruments will work fine for you.
If you have the Xcode project, then look at the code and the debugger while it is running. Other than that, if you run it in the iOS simulator you will only see the GUI portion of the app, unless you are running it side by side from Xcode (then you can use Instruments or the debugger). This documentation should allow you to run the apps on the simulator.

What is a good performance profiler for iPhone games made w/ objective-C and XCode?

I'm writing an iPhone game in objective-C using XCode. I'd like to profile the performance of my code. What is a good profiler to use?
Have you tried Shark? it comes with the developer tools.
Apple provides a program called Instruments, which is included with the iPhone SDK download, that really is excellent. It allows you to view memory leaks, animation performance, and a bunch of other stuff.
The developer tools you downloaded also included a great app called Instruments. You'll find it in your Developer folder next to Xcode:
/Developer/Applications/Instruments.app
Instruments works great for profiling and also has some preset modes that you can use to track down memory leaks, view how many instances of various objects have been created, monitor your OpenGL performance, etc.
To use Instruments, just build your app in Xcode, then while still in Xcode, launch Instruments from:
Run > Start With Performance Tool > Instruments Templates
…then select the type of performance monitoring you'd like to do.
Shark is an incredible profiler, included as part of Apple's CHUD tools, with XCode. If you can get that to run in, say, the simulator, you will be extremely pleased with the results it provides.
Just wanted to plug a set of profiler macros I created for iPhone. You can profile in the traditional sense vs sampling w Shark. It also doesn't require any special tools and the output is saved to a file in your app's Documents folder.
http://code.google.com/p/iphone-quick-profiler/
.n

How can I get an iPhone app to a client for review prior to public release?

I need to show an app I have developed to a client for review prior to its submission to the app store.
The client has an iPhone but not a mac on which to run xCode.
I have a personal (not company) iPhone developer account.
The client is too far away to visit in person.
What are my options?
If the client has iTunes, you can provision a build of your app specific to the client's iPhone ID (visible in iTunes). They just need to drag it into iTunes and then install it on their phone.
Plenty of docs about this in the Apple iPhone Developer site. Good luck!
Option #1:
Login to the iPhone developer portal website.
Add their iPhone UDID to the list of devices.
Generate a provisioning profile that includes your own test phone and theirs. Download the file (ends with .mobileprovision).
Double-click it to install it on your development machine.
Quit and restart XCode, then set your code signing identity to the name of this profile.
Build the binary.
In the left side of XCode "Groups & Files" bar look for Products (may need to expand the folder).
Select {yourapp}.app. Right click and choose 'Reveal in Finder.'
Now take that .app file and the .mobileprovision file you downloaded, zip them both up and send it to the client.
They will need to unzip the archive, then drag-drop the .app and .mobileprovision onto their iTunes and sync the phone. Your app should show up and run.
The portal site has more detailed instructions, but this is basically it in a nutshell.
Option #2:
Sign up with a screen sharing service like WebEx or glance.net (both work on Mac and Windows machines). Run the app in the simulator as they watch the screencast on their machine. If it's in the early stages of development, this is probably much more useful since they can give live feedback. In later stages, sending them the app is probably more useful. The nice thing about screen sharing is that they can take over the mouse and click around and explore while you're there to explain things.
Option #3:
Get a screen-recording app like SnapzPro or ScreenFlow and run the app in the simulator while recording a voice-over of its features. Send them a link to the movie. This is pretty useful if you're walking them through all the features. It's also handy if more than one person at a time needs to review the material. The advantage over #2 is that they can watch it over and over on their own time and take notes.
Depending on the stage of development, #3 is probably best in early stages, #2 in the middle, and #3 in the final steps.
I recommend having the client use the iphone configuration utility to install/uninstall early builds of the app. I am using this with my team and it lets you get direct access to the phone's console and error logs which is super handy when you're in the early stages of development. It also lets you manage the install/uninstall of the app and see the explicit version that you are installing in a much easier to manage way than itunes does.
Option #4:
Try https://testflightapp.com/ , this is easy for distribution of your app. Even Twitter Mirror is Using this to test their beta release.