How to add icons and more text inside Settings.bundle. Get more options - ios

I am learning iOS development and I have some questions to ask you in my first post.
To learn iOS I do an stupid application which have Settings.bundle. I want to put small images or icons inside it but I can't.
I also write to the right of the PSChildPaneSpecifier the value of a PSToggleSwitchSpecifier
Apple does it, see the image:
I search in NSUserDefaults Class Reference but I didn't find anything about this. Maybe it is impossible and only Apple can do.

You're right, it's something only Apple can do. Third-party apps are limited in what they can achieve in the settings bundle. The only icon you can have is the app icon on the first page, and the only information on the right hand side will be string values - see here for details.

Without being jailbroken you cannot achieve this, Apple simply won't allow it and does not offer a way to do this.

Related

How do I export text from iOS Notes app to my app?

I know this is possible and is something many big apps do, but I can't figure out among UTIs, extensions, UIActivityTypes, etc. which spell I need to use for this in particular. I'm trying to add my app to the list of apps that appear when you hit the export button in the Notes app on iOS because I want to be able to take a bunch of text inside a note and repeatedly and safely send it into my app.
I want my app to appear in this list, exporting directly from Notes. There appear to be duplicates of this question that are very old claiming that "exporting from Notes app is not possible for third party apps", but I think they're either now wrong or answering a different question because as you can see in the above screenshot, Messenger is plainly able to do this.
It does not look like registering UTIs gets this done for me. I went ahead and registered my app to all sorts of UTIs, but all that happens is my app ends up in popups like this one, which appears when trying to open a txt file, which is not what I'm looking for. Unless there is some other UTI that does not conform to public.data or public.content which I need to be using, in which case I'd be happy to hear it.
I used one of my allotted support requests to ask Apple, and after some time and back and forth I was able to get my answer! Here is what they said:
Your project is missing a Share app extension. Start by reviewing the
App Extension Programming Guide:
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/index.html#//apple_ref/doc/uid/TP40014214-CH20-SW1
Information specific to the Share extension point:
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Share.html#//apple_ref/doc/uid/TP40014214-CH12-SW1
You don’t need to register the text content type in your
CFBundleDocumentTypes. as you’ve done in your sample. However, you
will need to provide an activation rule for the extension point, such
as the one shown in this section of the document (the section titled
Declaring Supported Data Types for a Share or Action Extension):
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html#//apple_ref/doc/uid/TP40014214-CH21-SW1
See specifically the predicate example that activates the extension if
an attachment with the com.adobe.pdf UTI is present. You will need to
do something similar, to cover the UTIs for content you would like
your share extension to consume. As a starting point, you can consume
text with the public.text UTI. For more common UTIs, please see this
document:
https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html#//apple_ref/doc/uid/TP40009259-SW1
I also found the bits about providing an activation rule to be super confusing, and this answer helped that: How do I set NSExtensionActivationRule predicates?

Is this possible through iCloud, or would a private server be a necessity?

I'm trying to come up with an app that my brother was telling me about, but I'm not sure if it can be done or not.
Basically I want to have a list, that is visible through multiple devices. I want any of these devices to be able to edit/add to the list as well.
I was hoping I could use iCloud to make a word document that is basically just a list, but also be able to add collaborators. I know this is possible through the iCloud website, but is it available to developers?
Thanks
I think the answer is yes, so long as the app doesn't require a bunch of backend logic. But that will be for you to decide. Here is a great overview of what can be done:
https://www.raywenderlich.com/134694/cloudkit-tutorial-getting-started
Good Luck!

iOS 8 Today Extension: Is it possible to add editable text field?

I am trying to create a simple Today Extension. I was able to add a label wherein the value can be updated via the main app. Now, I am exploring the possibility to update the value in main app via the extension. However, when I tried to add a textfield, I cannot input anything.
Is this a limitation of the extension? If not, can you please guide me how to accomplish this? Thank you very much!
Unfortunately, it is a limitation.
It says in Apple's extension programming guide:
Because user interaction with Today widgets is quick and limited, you should design a simple, streamlined UI that highlights the information users are interested in. In general, it’s a good idea to limit the number of interactive items in a widget. In particular, note that iOS widgets don’t support keyboard entry.
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Today.html#//apple_ref/doc/uid/TP40014214-CH11-SW1

Quickly browse localized app store descriptions in other languages and/or countries?

As I am writing and translating localized app store descriptions for my app, I thought it would be handy to read other same-category apps' localized descriptions. However this has become more complicated than I had hoped (e.g., don't really want to change my Mac's language setting on top of my iTunes store country preference). Plus I have had limited success doing this on with OS X and iOS.
Can someone suggest a quick and easy way to look at app store descriptions in another language? I am sure I am missing something obvious here, for example currently I am poking around App Annie to see if it has archived localized descriptions.
Yes, there is a solution. You can use the urls that Apple provides and read the app description from there:
Head over to http://linkmaker.itunes.apple.com/ and you will see that there you can select a country.
For example, searching for "Twitter" in iOS apps and US you get (after removing the trailing url garbage):
https://itunes.apple.com/us/app/twitter/id333903271?mt=8
Now just change the country code. E.g., German and Italian:
https://itunes.apple.com/de/app/twitter/id333903271?mt=8
https://itunes.apple.com/it/app/twitter/id333903271?mt=8
The best way is to modify URL and view it in browser.
If you open an app using URL:
itunes.apple.com/app/APP_NAME/ID
(for example: https://itunes.apple.com/app/zuko-monsters/id545619234?mt=8)
you can just add country code after first part:
itunes.apple.com/de/app/APP_NAME/ID
itunes.apple.com/us/app/APP_NAME/ID
(for example: https://itunes.apple.com/de/app/zuko-monsters/id545619234?mt=8)

How do you find what you need in iOS frameworks?

I searched for an answer to this, but perhaps the question is a bit too noob for this site--basically I'm a bit overwhelmed by all the different frameworks out there or even how to find what you need in a single framework. If I want to, say, find a way to fetch address book data into my app, how do I search for that? Is there some magic efficient way that everyone uses?
The xCode Organizer window has a documentation tab that you can search in. Put in a keyword and it will show you refrences, example code and what framework that class is in.
I'm not 100% sure this qualifies as an answer, but yep: Google for it. Whenever I want to learn about something new, I Google for (for example) "iOS Address Book Example". That seems to be the best way to find info on how to get into a new subject when you're not sure which framework to look in.
If you have an idea of which framework is appropriate, then the iOS documentation (both at developer.apple.com and built into xCode) is your friend.
Just found this, looks useful:
http://sazameki.jp/software/cocoa-browser-air/
I know it's just the same info you can see elsewhere, but at first glance at least the layout makes it all seem more managable.

Resources