How do I add an app's own images as a separate folder in a UIImagePickerController so the users can select them as well? Written in Swift 3?
This app (Quotiful) has successfully done this. They added their own at the bottom under the devices photo gallery:
I'm no expert, just another iOS coder trying to help. Considering the lack of other comments/answers, it may be. (If others have any better thoughts/answers, I'll gladly delete this!)
When Apple came out with iOS in 2008 they "hid" any kind of file system from everyone. They've exposed some things since by way of extensions (document, photo editing, iCloud, etc.), URL (deep linking), etc. But they always have kept tight control on a few things (security, sandboxing, etc.) and this may be one of those things.
My best guess is we're talking a combination of a subclassed UIImagePickerController (yes, you can do that) that can access something stored in the camera roll but is flagged in ways to make it appear as not. It takes effort (and resources), but sure, with a database (to hold your meta data including URL location) you can do this.
Again, I'm hoping someone can give a better (and easier to implement) answer.
Related
In my game, I'm planning to add IAPs for different level packs that the player will be able to buy and play in the game. But after reading documentations on IAPs, there's still one question I'm wondering : Is it better to download the new content from Apple's server, or unlock it in the game with NSUserDefaults?
The problem is that if I chose option 2, the content will be easily hackable, and the app will need an update for each DLC I'm adding.
And the problem with option 1 is that the new content will be downloaded in the Documents folder, but my app search the list of levels in the resource folders (I know it's not hard to implement, but I'm just saying the pros and cons)
Anyone can tell me which one is the best practice, and why?
Thanks in advance!
Well, I think both options are good. Whats the size of these packs? If you have numerous iaps all consisting of new levels, id recommend to have them downloadable, imagine shipping the app without the extra levels, quite a network-loadoff.
As you are stating, option nr 1 gives you the ability to add levels dynamically. This is convenient since apple are quite slow when it comes to uploading of new builds. Come to think of it, they are not super fast when it comes to revising your DLC either.
Due to the hacking risk and initial reduction of app-filesize, I would definately go with option one but if possible, i'd provide the actual content from a private FTP server. That way, the new content is available directly.
I am developing an SDK for iOS. It basically help developers to use our service by placing button in any one of the screen. More than that, we are providing analytics.
In a website, I can provide a javascript snippet, which will help us track the usage and log it for analytics. Developers can place it in any template which is used universally (like in footer.html) and forget about it.
What would the ideal approach for the same in iOS. Basically I would like developers to init our service from AppDelegate or any one point and it should track the usage. Data that I would like to track are
User's id,app version, app id, etc. (Can be collected at the point the library is inited)
Usage time (time from the app was opened to went to background, which again can be tracked easily)
Viewcontrollers loaded and from where it was loaded (Couldn't find a solution unless developer extend viewcontroller from our class, or we write a category. Need a better solution as in AOP)
Button clicks (Same as 3rd point)
For all these, if we provide a solution like call [OurLibrary passFlag:VIEWCONTROLLERLOADED withViewController:self] will help it. But we don't want developers to do it explicitly.
Idea is to have our integration as easy as possible for the developers. Any ideas folks?
I'm interested in playing around with the word list used in the popular iPhone game "Draw Something".
I don't know how iPhone apps are developed, compiled, or deployed, but I'm wondering if, once the app is installed on my iPhone, the word list is kept in a file I can access/read/modify?
I'm sure this varies from app to app - some apps might keep resources like this on a server, and in other apps, the data might be compiled. But perhaps some apps read data like this from something like XML- or CSV-formatted text files that are stored on the phone, and potentially accessible? (Or, backed up to your PC or Mac?)
If so - are those files accessible? If so, where/how?
I'm not an iOS developer, and I'm not interested in copying, stealing, or plagarizing anything from an existing app.
Specifically - I am interested in creating an information visualization based on the word list from "Draw Something." How many words are there? Which words are "easy", which are "hard"? Is it harder to draw a verb, a noun, or an adjective? I thought this might be a fun, (potentially) interesting thing to analyze.
That got me thinking... "I wonder how apps are stored on my phone?" (Or, backed up to my PC/Mac). Are they a single compiled executable? A handful of dlls? Is app data stored in simple text files, a database, or something else? Are these files accessible? Etc.
Many thanks in advance!
You probably got down voted (and may yet get removed) because this isn't really a programming question, and those are what SO is for. Power-user questions fit better elsewhere in the Stack Exchange network.
In the meantime, if it turns out this word list is stored in an easily readable file in the app's bundle... Apps are stored on the Mac/PC you sync your device to, somewhere under the iTunes Music folder. Each is a ".ipa" file, which is really just a zip archive. Change the file extension and you can unzip it to see what's inside.
Apps get file system access through the sdk. There is also a object-relational framework called Core Data that lets an app create and access a SQLite store. Apps can also maintain a small amount of state (usually user prefs) in a shared user defaults store.
In one word: No.
I'm 99% sure you can't lift the word list from "Draw Something". It's boxed with the app bundle, and not readily readable as a file.
I'm trying to plan out an application on the iPhone/Android that could be used to track dates/locations of events and update them as necessarily but I really have no idea what kind of method I should take.
Currently, there's two ideas for methods in my head:
1) Make a mobile webpage/website that could be updated with the necessarily information, then display this particular webpage/website on the App for users to view.
2) Make an app in iOS/Android to do the above without displaying the webpage at all.
The first idea is the easiest for me to grasp, since I roughly know the procedures of setting this method up. Displaying the webpages on a iPhone/Android screen should be relatively easy and this also allows me to only update the webpage with the latest information and all without (hopefully) building some kind of update system for the app itself.
The second idea is probably the better of the two, since I can make use of all the nifty features in the iOS/Android to make some pretty cool (what are the cool things, i don't know yet) things. I'm not exactly experienced in the field of creating apps, and I really have no idea how to start some kind of self-update functionality on an app, seeing all the apps I've done thus far are offline-based apps that does not communicate with anything save for local files. Should I get the App upon startup to download a file (XML or whichever?) to "read" the contents then update as necessarily?
Or should I just go for the first method, since it can be more efficient than the second one?
I'm really lost here, can anyone offer some tips and advice?
I believe that the first approach is a good one but I would suggest the following:
1- Create the website that will do all the business in your mind then
2- Port out the application in an easy way to be a mobile application how? Please have a look into this http://www.appcelerator.com/
3- Another idea that would save you the pain of going into all the above is to create a facebook application, this way you can make use of the facebook infrastructure and you will have the viral effect as I guess thats what you are looking for.
I hope I've introduced a good tips for you.
Is there a way to decompile the binary from an IPhone app.
I jailbroke my IPhone and was surprised to find other app's dbs wide open to be copied.
So I exported my most important table and hardcoded it into code.
Instead of loading table into array from a db I just generated code to fill the array and kept only the most basic DB info so relationships still work.
Took a while but now works fine.
I was just wondering am I safe, could someone decompile the binary for the app easily and extract the data. In Java its easy to decompile *.class files though thats bytecode where I presume iphone apps are more low level.
I know IPhone sdk 4 can mark files as secure. Anyone know can this be overridden by jailbreaks or is this an unix lock?
Short of encrypting that data, you are really only protected by peoples lack of motivation. If someone with enough motivation wants to look at the data, they can. Even if you encrypt the data, if they key is in, or generated by, your code they can find that too.
To be honest Apple couldn't secure a brick. The iPhone has been almost continuously jail-breakable seance the beginning. Users (read hackers:) have more control over the device than developers. There is no way that you can truly secure content on the device. If encryption is used, there is nothing keeping the attacker from obtaining the key. (He has control over all libraries and can hook any function call he wants.)
It is common to see developers fall back on Security Though Obscurity, and I'm not going to entertain these ideas. If there is data on the device, a hacker can and will make a copy of it.
I jailbroke my IPhone and was
surprised to find other app's dbs wide
open to be copied.
No. There is nothing wrong with this. It has to be stored somewhere.
So I exported my most important table
and hardcoded it into code.
Bad move.
A jailbreak from a priviledge domain is a vulnerability in the phone and is not your problem. There is nothing you can do about that, and even encrypting your data will not save you because all privileged code on the phone will be able to access the encryption keys.
In other words:
Code will not normally be hostile and steal your goods. The only reason it would is because the user downloaded bad code onto the phone or a remote exploit took place.