I noticed a new setting screeen on the iPhone since iOS4: Settings -> Developer (just below iPod, Photos, Store) -> Power -> Logging.
Does anyone know what this does? I could not find anything about it in the documentation or on the net.
This is part of the newest version of Instruments and iOS4. You can record your power usage while your phone is on, running apps, doing whatever you please. You can then load this log into Instruments and see various events and the powerlevels they required. This is great for optimizing games and other high power usage applications.
Is this removed in iOS 4.1? My iPhone 3Gs is developer-sanctioned, and I'm sure I saw the Settings > Developer menu in 4.0.1...
Related
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.
When selecting an iOS device and clicking the "Use for Development" button in Xcode organizer, what does it change on the device (iPhone or iPad)?
Are there any debugging symbols installed or some sort of profilers or loggers?
Does this mode affect device performance or battery life while being "used for development"?
It installs a development profile certificate on your device. Code signed by these certificate will be accepted to run on the device.
From my experience, the practical consequences of turning on a device for development are an increase of levels of logged data and access to these logs. (I'm not sure if logs are activated for all apps or just those you develop yourself.)
This extra logging activity might have a storage impact and an impact on energy consumed too but as you're most of the time plugged in a machine running XCode when you test the applications you develop, I never saw any impact on the battery life when I switched back to be a regular user of my device (as opposed to a developer user).
Regarding your question, Does this mode affect device performance or battery life while being "used for development"?
No, there is no additional drain on the battery.
If you have Development mode enabled on your iPhone you can access Settings > Developer menu e.g for emulating network conditions http://natashatherobot.com/simulate-bad-network-ios-simulator/ (amazing feature).
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.
I'm trying to monitor my core data usage but all the Core Data instruments are greyed out in Instruments. It's also not available from the "Run with Performance Tool" in Xcode. It says that the Core Data instruments are for the Mac and it's not available on the iPhone, but I've heard people talking about using it, and it's mentioned in the Apple docs too.
How can I get them working?
Thanks!
You can run Core Data instruments against the simulator only, not the device.
Open Instruments and select the Core Data items you want, then use Instruments to launch the simulated iPhone app, instead of launching from Xcode.
Hopefully this support is better in future versions. Also, I believe it only works with 3.1, not 3.0.
I want to use Shark on OS 10.5 to do some basic profiling of my iPhone game (Open GL ES + Objective C). How exactly can I do this? I've read tutorials but they are too verbose for me after a full day of coding at work and a few hours of iPhone development afterwards.
Build app and launch on device
Launch Shark
From the Shark menu, select Sampling->Network/iPhone Profiling
In the Shark window, select the radio button "Control network profiling of shared computers".
Select your iPhone in the list and optionally configure the profiling session
Press Start to begin profiling, and Stop to end
After that, viewing the profile results is pretty straightforward, assuming you've looked at other profilers before.
Hope this helps!
Shark will only work for iOS devices running version 3.x
As of iOS 4.x, SHARK support has been removed from the OS, with no plans to bring it back.
Apple recommends using Instruments instead.
Right From iOS 4, support for Shark is stopped. INstead we have to use Time Profiler available as part of the Instruments.
A discussion on Apple's Dev forums give information about this:
https://devforums.apple.com/message/243237#243237