How to set an image in my own app as wallpaper of lock screen in ios7? - ios

I am building an album app. I want to set a photo in my own app as wallpaper. Is there some method available for doing so?
update:
I know there are already some similar questions posted. But they are out of time. So I am wondering if there is some method in iOS7 to implement so.

For apps going into the app store this isn't possible. Apps can't change anything outside of their environment this is because apps on iOS run in a sandboxed mode so they don't know anything about other apps that are on the device and can't affect the OS directly.
To actually do it you would probably need to use some private API so your app would get rejected under:
2.5 Apps that use non-public APIs will be rejected
but I suspect that they would actually reject it under:
10.4 Apps that create alternate desktop/home screen environments or simulate multi-App widget experiences will be rejected
As you are directly altering the home screen.

Related

iOS native app wrapper for push notifications in PWA

Is it possible to create a native iOS app which only services as a wrapper for a pwa?
So the native app has no functionality other then to load the pwa inside of it and some background functions like push notifications.
This way I would like to create the functionality of push notifications, but still only have to create a pwa.
So when you open the native app this app will open the pwa (In my mind it looks similar to an iframe inside the native app). Everything will happen in the pwa, but we can still send push notification and use other features which are not yet available in the pwa.
If this is possible how can this be accomplished?
Apple writes:
Your app should include features, content, and UI that elevate it beyond a repackaged website. If your app is not particularly useful, unique, or “app-like,” it doesn’t belong on the App Store. If your App doesn’t provide some sort of lasting entertainment value, it may not be accepted.
Link here
I've heard that they are very consistent in not allowing apps outside of their guidelines and as long as you are not giving additional value in the app, that is not present on the website (your PWA), it will not be accepted.
I still have not heard anyone who succeeded with the wrapping alone, but if there are cases I am very interested to know too.
I think Apple will not approve your app

Detect which app is in foreground on iOS9 without jailbreak

I'm trying to log users individual app usage on iOS9.
I'd rather prefer that it wouldn't use jailbreak limited solutions, self explanatory. Doing the variation of this app on a jailbroken phone shouldn't be hard.
This will certainly not be released on the App Store as Apple wouldn't allow it.
I'm looking for any private API that can do this, any hidden iOS API's that can be used to do this. ANYTHING.
What I've already looked through:
how to determine which apps are background and which app is foreground on iOS by application id
How to know about app launched and details jailbreak iOS 7
Is there a private API to be able to detect what is current foreground app on iOS?
How to monitoring App running in the foreground in iOS8?use the PrivateFrameworks SpringBoardServices
which proved to be relatively helpful - we now can assume that there is some sort of additional access requirement, probably an entitlement, but we don't really know how it should look like
Can you find individual app usage duration using SpringBoard services framework or other private framework?
Find out active application or if on Springboard
Programmatically detect which iOS application is visible to user
However all of these proved to be unhelpful because Apple fixed this security flaw with iOS8 and the method to copy/access the currently front most app bundle identifier no longer works.
Question is: Is there someone who knows a workaround using different tools/exploits that do not require jailbreak?
Ideas:
inspecting the processes running on the device and devising an algorithm that would be able to recognize spikes that mean an app has been launched, which potentially could work, but it probably would be a major pain in the ass. Questions mentioning this solution:
Detect which app is currently running on iOS using sysctl,
Return a list of running background apps/processes in iOS
How to get Names of Background Running Apps
Find Background running apps in iphone
inspecting the phones traffic somehow?
not sure if there is some kernel stuff that I could do
Here is my Reddit version of this question if anyone wants to check it out. Also if it's of any value, here are the runtime headers for iOS9 and list of Apple's private API's.
Unfortunately, I was looking for a similar solution and have come to the conclusion that, at least at this point in time, there are no known methods that will allow you to determine app usage on iOS. Even the MDM providers such as Good, Airwatch, MobileIron, etc. don't seem to be able to do this. If anyone is able to come up with a solution, I'd love to see it.
For now, however, I think we would have seen a solution if someone had one that worked on the latest iOS.
sysctl is still open but they block certain combinations of selectors. I did this on iOS 7 and gave Apple Product Security the code. They won't patch iOS 7 but rely on App Review. iPhone 4 is wide open.

Simulate device buttons inside my app?

I have a view containing 4 buttons:
Home
Lock
Volume up
Volume down
all I'm trying to make is that when you press one of these buttons, my app should do some communication with the device to simulate one of these buttons.
Example: If I click the home button exists within my app, is the same as I press home button in device.
This kind of thing is possible? jailbreak is necessary for this?
None of these functions are available to you if you want to get your app accepted into the App Store. For a while some apps accessed private API's in AVSystemController however it seems recently apps using this method are being rejected. (Although some apps still using the method seem to be left in the app store)
If you want to go down the jailbreak route you'll have to dig into private API's and the headers of the various frameworks.
Also just a note, Apple provides some sort of interface like this through their accessibility options.
To do what you are after would go against Apple Review Guidelines so it will get your app rejected under
2.5 - Apps that use non-public APIs will be rejected
You are not allowed to take the functionality of the Home and Lock away from these buttons and put it within your application.
Though I will not say it is impossible to do if your app is for jailbroken devices. Such as to exit your app you can do exit(0); though I still wouldn't recommend it as it makes it look as though your app has crashed when it hasn't.
For the volume control you can do this with the use of MPVolumeView I would recommend having a read of the Apple Documentation and this question iOS: Accessing device hardware audio volume control

Is it possible to have a running background app on iOS

This is a strange one, I have a need to create an iOS app that runs in the background on an iOS device, but can not be visible on the Home screen of the device. The app may need to show up in Settings to configure a few options, but it mostly needs to run behind the scenes.
I do not need to publish this app on the app store, it is strictly an enterprise app for my company.
Does anyone know how this kind of behavior might be achieved? Configuration profiles? API's? etc?
Edit: Jailbreaking the device is not really an option for us. We have to keep the devices as they are.
Backgrounding
There are several methods to get permanent background execution:
a) Silent audio which is mentioned by JRG-Developer
b) Usage of beginBackgroundTaskWithExpirationHandler + turning location manager on/off (it will reset remaining time to 600 seconds)
Making app invisible
You can use SBAppTags in Info.plist (take a look at this: How to remove app icon programatically from jail broken iPhone app?)
It will make your icon not visible on Home screen.
I've no idea how you can tackle the not be visible on the home screen criteria, but there are certain services that are allowed to be run in the background continuously, notably:
Background Audio (even silent audio)
While this is indeed very hacky, short of jailbreaking the devices, this may be your best bet.
While it's unlikely / very difficult to get past the review process, in the event for some reason you do need to (attempt) to publish this app to the App Store, some apps are even available on the App Store which take advantage of this hack, such as PasteBot.
You should definitely read their write-up here about getting their app's Cut-and-Paste functionality to work while in the background:
http://tapbots.com/blog/pastebot/pastebot-music-in-background
Another out-of-the-box idea, why not use Android devices instead, which do support multitasking?
Two methods:
Jailbreak. A jailbroken iPhone is essentially a Mac and you can use all Mac UNIX programming tricks - spawn a daemon (you can even ask launchd to do that), or something. You can set up enteprise-wise Cydia source. Refer to saurik's website for a walkthrough and set up an experimental server using Ubuntu (which used apt too)
A non-jailbreak way may be possible, but it will depend on what your app is doing. You can try use enterprise-wise push notifications.
Given that this is impossible to do on non jailbroken phones, I'd suggest the following:
develop a directory app, or a phone list app, something that is specific to your company.
have it connect to a web service once a day to register the device ID (so you know the user has not deleted the app)
tell users they need to keep the app open at all times (and if a user's device does not register one day, send them an email asking them to launch the app).
Now you can send back whatever you want with the app. If they kill it, you'll know the next day when you have a script look at the logs.
If you think this is a terrible idea, it is, but its the best you are going to get on iOS right now.
EDIT: you could send a notification every day - say in the AM - to make sure the user opened the app if it wasn't running.
From my experince, this kind of behaviour cannot be achieved on iOS. When an app enters into background, it is active only for a small particular amount of time. After that, it goes into hybernate state. It stops working. So the behaviour you said can not be achieved without abusing iOS workflow. Thats why some call iOS's multitasking as not true multitasking. Only jailbreaking might help your case. That was for one case. The second one where the app cannot be seen on home screen is again, impossible. It has to be on springboard to run.

Programmatically executing the application out of sandbox in iPhone

How to build an application which is capable of executing outside the sandbox in non-jail broken devices? Because I need to access the files and other informations like sms, call history etc ...
I'm afraid you will probably not be able to do this. The provided SDK, and terms of using the SDK do not allow you to operate outside of the sandbox.
Even if you were able to access the information, then the app would only ever be for your own use (unless you are an enterprise developer) as it would most likely get a rejection from the App Store approvals process.
The only access outside the sandbox that is allowed is mediated through Apple's SDK. You will only be able to access specific items, such as the Address Book or Photo library, through the iPhone OS framework.
If you have a more specific question about what you want to accomplish, perhaps we can answer based on what is currently allowed.
There's no method that I know of to perform access outside the sandbox that is defined by the iPhone SDK.
Even if there were, your app would not be available for non-jailbroken phones, as it wouldn't be approved by the app store.

Resources