how to make my ios App bigger(disk size) - ios

For some reason my boss think the bigger an IOS app is, the better it will be. I finish the app he wants but he thinks it's not good enough because it's on 13M. So what should I do, put a music in project?

You could add a big file that would not be used in app, an image, or just a data file with random data in it.
Or you could explain to your client that a smaller app is easier to download for the end user.

Related

How to best move a huge .sqlite database to a new directory on an old, low memory iOS device?

For my latest app update, I have to move the user's Core Data .sqlite database from the Documents directory to the Application Support directory. I use the migratePersistentStore:toURL:options:withType:error: method. I am dealing with one user who somehow managed to save enough data in her database so that it is now a whopping 9G. On top of that, her device is an iPad Air 1 - which had memory issues around the time it came out five or six years ago, and now it is 2018 and she is running the latest iOS. The migratePersistentStore:toURL:options:withType:error: method keeps crashing the app with low memory. But I have no other way to get the .sqlite to the necessary location. Can anyone advise me on how to best approach this situation? Ideally, something I could do in my code - but I would even appreciate suggestions on other ways I could just help the user to manually move that massive database at this point!
I guess you use migratePersistentStore because its the official way to do it. Its a good way, but sometimes you have to make your hands dirty:
Manually-moving database at app-start before you load it
This post shows that CoreData may use more than one file which you have to move. You can list the files in the directory, use a regex find all the files which have to be moved, move them to the new location and then load CoreData as usual from the new location.
This however requires there to be the necessary infrastructure in place to do this. You‘ll figure it out if you want to go this path.
You can hide this behind a feature-flag, only with a code, only for a certain user or after crashing with low memory so it doesn‘t impact users who don‘t need it.

What is the best practice for storing a large number of images for iOS apps?

I'm in the middle of making an app that will end up needing somewhere between 300-500 different images. I don't know if a database is the right way to go about this, or storing them locally. I doubt locally could do it, seeing as the app size would get huge. Would I just download all the files necessary for an event, then unload them when the event is done
TIA!

Can you turn only one page into an app in meteor?

I have just tried to run
meteor run ios
That command emulates my application as an app. But there is just one page that would be interesting to have as an app. Can you control this in some way?
I don't think this is possible. The whole app gets exported regardless of platform, hence the universal/isomorphic apps concept. And in the universal app concept is one that I'm starting to find fault in. That said there is a better middle ground.
We'll call it sudo-universal apps. (probably a horrible name, but whatever :D)
Essentially the concept is that you have 3 codebases, for each device (web/ios/andriod) but share many of the same modules via something like npm, or potentially some other way of sharing code.
Then you can focus on the ui for each device and its strengths and weaknesses, but keep all the important logic you've built.
Check out the following:
https://voice.kadira.io/say-no-to-isomorphic-apps-b7b7c419c634#.3bn5ovts1
https://forums.meteor.com/t/say-no-to-universal-apps/16813/7
Hope this helps!
You can check whether the client code is executed on iOS or not, and change the app accordingly:
if(navigator.userAgent.match(/(iPad|iPhone|iPod)/g)) {
// Disable the links, and redirect to which page you want
}
But Justin's answer is great, a new platform usually needs more than just some tweaks. A quickly developed app has very low value for the user.

How to work out the amount of local storage your app is using on iPhone/iPad in app

Is there a way to get the same data that is shown in settings->usage in iOS7 inside your application?
I know I can get the overall amounts like free space and total space, but I want also to know how much of the used space is my app.
App size - size of app bundle (appreciate I can pretty much work this out on my own, just wondered if it's possible to get in app also.)
Local storage size - i.e. mbs used for file storage in app.
Hope that's clear, thanks in advance.
I just searched a bit in the web and found two answers that may help you here and here. The first one proposes using a script, the second one explains how to find the size of a file.
It appears there is not convenient way of doing this on device and the way to do it was to use NSFileManager and iterate through the apps local file system each time and add all the bytes up for each file encountered in each folder to get the application size.

How do I download multiple large files and saving locally -- URLStream or URLLoader?

This is absolutely driving me crazy. While I'm a fan of the availability of asynchronous calls in AIR, I'm finding that being forced to use them for something that should be SUPER simple is a severe limitation. So severe that I may end up abandoning AIR and writing native Android and iOS apps instead of using the shared AIR platform.
OK, now that I have that off my chest, here's what I'm trying to accomplish. I have an app that, when deployed, is relatively small. But once deployed to a user's device that user will log in using a login name/password. Once they log in, content specific to that user needs to be downloaded and saved to the local device. Since the content varies by user I can't include it in the package for deployment.
But I cannot figure out how to accomplish this: say I want to download 10 files and each file is 2-3mb and I want to show a "Downloading, please wait..." view during the download. The application cannot proceed until all 10 files are downloaded. But since from what I've seen URLStream and URLLoader are both async I cannot figure out how to block the app from opening the "View available content" and say on the "Downloading, please wait..." view. Can anyone point me in the right direction??
I am new to AIR/Actionscript, but am a seasoned developer. Perhaps too seasoned in my old ways to think of an elegant solution to the above!
I would take a look at BulkLoader with a combination of dispatching/listening for completion. That way you can update the progress meter if you want, so on. Hope this helps.

Resources