Programmatically lock iPhone on iOS - ios

Does anyone know how to programmatically lock the iPhone on iOS? I don't care if it involves using private API or framework as it's for personal use.
I have tried using https://github.com/neuroo/LockMeNow but it doesn't work on my device (running iOS 10). I guess it's for iOS 5 and below only. Does anyone have an updated method that works on newer versions of iOS?

My iPhone 5 lock button is not working properly, so I wrote this application.
If that is the issue, there is a better way. Turn on AssistiveTouch.
You'll find it in
General -> Accessibility -> AssistiveTouch
I use that because all my buttons aren't working and it's very easy to get used to. I know this doesn't strictly answer your question, but it may solve your problem. I hope it helps.

Related

My app on iPad can't read photo after iOS9.3

My app only support iPhone device, it can run correctly under iOS9.2 on both iphone and iPad. But after updating to iOS9.3 and iOS9.3.1, my app on iPad can't read user's image. (Both ALAsset and PhAsset have the same problem. )
The image will return nil, and I ensure it's a bug, because it can read image correctly, when I change my support device to universal in Xcode.
Is it a bug for iOS? Or it becomes the rule? All app need to support universal ??
What's the fastest way to make myapp support iPad? I just want to use the scaling like the way iPhone app run on iPad.
I have also faced same kind of problem two days ago, I think you need to update your xcode. Update your xcode to the latest version 7.3
It worked in my case.
I met exactly the same problem and I fixed it.
I can't find any quick solution, and I decide to make my app into support universal.
This means support both iPad and iPhone.
The main efforts are the resolution issues. iPhone is 16:9(320x568 for logical resolution) and iPad is 4:3(768x1024 for logical resolution).
To speed up the modification and no change for my art images, so I put my content int the middle on 4:3 screen.
One good thing to support iPad, users can easily search on app store when he use iPad.

iOS Simulator Rendering issue for PDF Reader Core for iOS

I have searched around on here, but couldn't find anything to answer my question. I have developed a custom app for the iPad; it involves using a set of PDf documents that change pages based on a 1 second time frame. To achieve this is have used the 'PDF Reader Core for iOS' external library. Please find the link here: https://github.com/vfr/Reader
The app works perfectly fine on the actual iPad, however I also wish to run the app on Mac Mini Machines, so the obvious thought I had was to boot the project in the iOS Simulator on the machines (saves me recoding it for OSX.). Now, here is my issue. The app works pretty smoothly in the simulator, the only issue I have is that there is a slight render lag between the page change on the Simulator. It isn't at full resolution, and appears blur whilst it renders, however the time frame to change is so quick that the simulator doesn't have enough time to render to full resolution. I have also emailed the developer of the library and he provided some suggestions however, these didn't seem to fix the issue.
I am aware that this could be to do with the actual PDF Reader itself, however I wanted to ask if anyone had any suggestions if this could be fixed in regards to the iOS Simulator? Any way to speed up the simulator?
I am using OSX Yosemite, Xcode 6.4 and Objective-C.
It seems at this moment i may have to recode for OSX. Any suggestions would be highly appreciated.
Thanks

How to format app properly on an ipad from an iphone app in xcode?

I've written an app in Xcode and I set it for iPhone, but now I want to make the app available for iPad. I don't want to go through the trouble of making it universal, is there a way I can run this iPhone app on my iPad correctly formatted?
You can just set the target Device to iPad and run it. See below. Your UI may or may not look good depending on if you properly used either AutoLayout or Springs and Struts.
The iPad is a very different canvas for a UI than the iPhone and there is no definition of what "correctly formatted" really means when going from one to the other. It's a subjective matter and a computer is not going to decide if it looks good for you. As such, you may not get what you are looking for.

Best practice. Make iOS app universal with supporting iOS 5, iOS 6 and iOS 7 UI

I suppose that I can make it using different storyboards for the different iOS versions.
Because of differences in UI I will create next storyboards:
Main_iPhone.storyboard
Main_iPad.storyboard
Main_iPhone_iOS7.storyboard
Main_iPad_iOS7.storyboard
Is this good solution?
IT's hard to provide a YES/NO answer without knowing the whole problem, but in my humble opinion I would say yes, that's a fair approach.

Convert iPad application to iPhone application?

I have written a tab based iPad application which has done well. I never intended for it to be an iPhone application because the content it displays really doesnt lend itself to such a small screen.
However, I have been getting a lot of requestes for the application to be compatible with iPhones as well.
Can someone point me in the direction of some documentation that may help me figure out how to convert my app.
I presume it's not so simple as having aanother set of XIB files for iPhone and just have it display them if the app is running on a phone...
I recently found this blog post on the topic. You might find it helpful:
http://www.raywenderlich.com/1111/how-to-port-an-iphone-application-to-the-ipad
Plus there's some discussion of creating a universal app here:
iPhone & iPad versions of same app?
iPad Programming Guide: Creating a Universal Application

Resources