Add custom settings bundle to jailbroken iOS settings.app? - ios

I was looking into making a custom toggle switch option in the iOS settings.app menu to turn a home cooked function on and off. I was wondering if it's possible to do such a thing. If so, how?

Yes, this is possible, but it works a little differently for jailbreak apps, installed in /Applications, than it does for normal App Store apps.
Take a look at this documentation here. I haven't used it in a while, so if there are things that are out of date, post a comment here, and I'll try to update my answer with code, etc., from one of my working jailbreak apps that does this.
Note that if you want the Settings switch to execute your custom code, rather than just storing a preference value, you'll need to use the PreferenceBundle Approach described in the link above.
You'll also need to make sure the phone has PreferenceLoader, by Dustin Howett, installed on it, for this to work. If you're distributing your app to users (via Cydia, or something like that), you can make sure that PreferenceLoader is automatically installed along with your app. To do this, add this line to your app's DEBIAN/control file:
Depends: preferenceloader
PreferenceLoader is free, has been around for a while, and seems pretty stable, so it's not a bad dependency to have at all. Most jailbreak users will likely already have it.

Related

Isaac Wasserman: How can look at all of the source code for an iOS app?

[3/16/15, 7:38:28 PM] Isaac Wasserman: I want to make an app that uses similar mechanics to Madden mobile. I want to look at the code using Xcode, but it doesn’t seem like I can read it if it’s not a project. It contains .viv files.
You can't get the code from the app, the app is a compiled binary. On top of that it is encrypted so even getting the binary is difficult.
Even if you could that would be stealing unless you had explicit permission.
If you have connections with the developer they might give you the source, but that's about it. You can always take notes on what the app does that you want to replicate and then come up with your own solution to accomplish it.

How to hand-in an Xcode project in a wise way?

well, I have my Xcode project done recently, which is a "promising" iOS app, and need to be evaluated by my boss in order to apply for a development group. But, no wonder, bosses are always, u know, lack of "professional" skills. I even cannot assume them to have an xcode compiler on his computer.
But, I need to present what I have done in a intuitive way. I have already finished a "project report", and I have to hand them in together with my project codes. well, that's the rule, and I cannot stay with my bosses to explain "how to open the file"..
So, I am wondering if there is a more simple way to show them the app. luckily, I can burn a CD to store the things they need. However, obviously, I rank "give them a Xcode install file" as the least choice.
Is there any better way that I can show my work? i.e. provide an iOS Simulator with that app pre installed? how could that happen? or any way else?
by the way, I have tried to upload it on App Store, but failed. Since it is just a raw beta version (too ugly to be listed on Store, as Apple explained). And I have heard that I can use "Enterprise Distribution" to skip App Store check. But, I cannot have an "Enterprise license".

Is the iOS "Exclamation" Badge/Button available for use within an App?

I suspect that the answer is 'no' - but perhaps I'm missing something in the api...
I'm aware of the constant UIButtonTypes for UIButton:
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIButton_Class/UIButton/UIButton.html
But I've also seen Apple use the exclamation badge within their apps, for example, the Reminders app:
Does anyone know if that button/badge is available?
Or am I making my own?
As I commented, you won't be able to use this button directly.
I don't think you can point to any source to say this, but from my own experience, I never found this button.
But, what you can do, is create or find the button's image. The second option is the easiest one ;)
I found this, giving you all iOS' images (iOS 4.3, but still good) : All stock iOS 4.3 UI Images.
Or you may use directly these normal/selected retina images (comming from the above link) :
And the non-retina versions :
Quick note, you may want to use this button very carefully. As it is a system image, you must use it the way iOS uses it. If you try to use it in an unappropriate context, your app may get rejected by Apple.

Reuse Xcode project for new app

Similar questions have been asked before, but I can't find the specific details I'm looking for. I have an Xcode project which has been completed and submitted and is on the App Store. I want to make a similar app for release in a different country. To avoid complications, I want to use a fresh project in which to make the changes. I intend to make a copy of the original project, tweak it, and then release it (this is not about language so localization is not the answer).
Because Xcode is doing so much complicated stuff under the hood, and because I'm unsure of exactly which details are being validated when submitting to the App Store, I don't know which details I need to change to ensure two separate projects on my Mac and two separate apps in iTunes Connect.
Obviously I will need new provisioning profiles for the new project. What else do I need to change once I've duplicated my project? The bundle identifier maybe? Anything else? Any advice much appreciated.
The thing that must change between projects is the application ID (or bundle identifier, as you called it).
And yes, when you change the application ID, you do need to create new provisioning profiles to go with it.
If you're feeling really ambitious, you can use the exact same project as your original one and merely create a new target (and application). That way any code changes you make to one can be picked up by the other and the differences would be the ID and maybe the localizations/resources used in each app. Here is a related question that talks about that.

finding unsupported apis with os version

I've developed and application for iPhone. It works fine on os4 but it does not work on os3.1. In fact works but there are some problems; after splash screen a what screen appears. while I leaving the application I can see the application is opened successfully but just see while exiting.
So I wonder if there is a tool which says which apis have problems with os3.1? So I have a chance to replace them.
If you want to check a specific API, just run this in your code somewhere with an appropriate response. For example, to see if print is supported, run this...
if (NSClassFromString(#"UIPrintInfo")) {
}
Set your project's Base SDK to iphone-os-3-1, then build. All the error messages about classes, methods, and functions that don't exist must designate things added since iphone-os-3-1, since your project built and linked fine against the iphone-os-4-0 SDK.
If you don't have the iphone-os-3-1 SDK, try this instead:
Open your project's Build Settings.
Find the "Preprocessor Macros" setting.
Edit it and add __IPHONE_OS_VERSION_MAX_ALLOWED=30100
Now, try building. This should cause everything introduced after iOS 3.1 to be labeled unavailable, producing the same errors as if you had switched to the iphone-os-3-1 SDK.
It's a good idea to get a second installation of Xcode for this situation, in this case you need 3.2.1 with SDK 3.1.3 - I wish I could help you with a download link since it is no longer shown on Apple's page, but I have googled in the past and found direct, official download links which will work as long as you are signed in with your developer account, so good luck.
The annoying bit is that you need to go through your project files and set "Base SDK" to 3.1.3 and then back once you have completed the exercise. But it is the easiest way to flag what you can't do in 3.1.3. "sudo rm -rf" (I feel nervous even typing that) has an excellent method there but you need to have an inkling of what might be safe and what might not before you implement it or else you end up with code 10x the size it needs to be.
Apple really needs to sort out this issue - hopefully by flagging methods that are prior to your specified "Deployment Target", in the same way that deprecated methods are flagged.

Resources