Trimming down skobbler map size & offering download alternatives - ios

We're making offline road-trip planner.
We want to use skobbler maps but the main issue is that the framework is way too big.
Even with some trimming down options, it's still over 110Mb (only with skobbler framework).
Inside SKMaps.framework there is a document SKMaps with 95Mb is size.
No program can open this document (at least no program i have on my mac atm).
I was wondering what might be in this document and is it possible to 'open' it and remove unnecessary files from it.
I am asking this because when I launch my app with skobbler in it, there is a map of entire world available to explore.
I don't need that. I only need several states in the US and that's it. One state is roughly 30Mb in size, which is acceptable and download option for each state can be an asset, so a user downloads only what he needs.
IF there is no way of deleting entire world map from framework, what are my other options?
Can this file SKMaps, with 96Mb in size be downloaded after a user launches an app, so I don't have a huge app on the app store?
Can i write and launch my app without SKMaps in the app bundle from the start, and I make the user download it once he starts an app for the first time?

Edit the SkMaps.bundle and this will impact the .framework object.
Indeed, the unpacked size will be > 100 MB but when packing it (generating the .ipa file) it will only add ~20MB to the final app file (i.e. compiling the demo project without audio advices and only 1 style, targeting both armv7 and arm64 will generate a .ipa file of ~ 19.4)
By default the demo app does not "contain" any maps - it connects to the servers and downloads the map from there.
If you'd like to download "offline maps" - see the "Maps.json and downloads" example in the demo app.
If you're intent is to "prebundle" an offline map within your app see: http://sdkblog.skobbler.com/creating-an-app-with-a-pre-bundled-map/

Related

How to embed Autodesk Forge Viewer with mobile app?

I was using ionic and angular to develop a mobile app that could display the pdf, image or dwg file within the forge viewer. It works all perfectly on the website monitor, but when I deploy the app in the ios phone and the android phone, I found out that if I open the dwg file and some image file, the app will crash sometimes. Btw, some extension is not supported by ios, such as pushpin extension. It seems that three js works not good in ios.
I also check the document about the "Create iPhone Apps Using Forge Viewer & React Native" in the forge viewer official website. After I follow the steps to build the app with native react and deploy it on my phone, pdf and image file works good but not for the dwg file.
I have experience building apps with ionic but not React Native. Compare to these two frameworks, which one should I pick? If I continue using the ionic framework if there is any way I could use to improve the performance of the forge viewer inside my app? or would it be better to switch to React Native?
For tech questions, how could I avoid the app crash and improve the performance? I checked the A360 app on the app store, I found out that the app is using the offline data, it will download all the data once it opens the file. Should I do the same way?
App Viewer
Technically both RN and Ionic embeds Viewer as external dependencies in WebView so there's no material difference/pros and cons in the approach to embed.
As such I'd recommend to go with the framework you are more comfortable/experienced with - although RN seems to be blessed with a couple of samples but those do little more than scratch the surface when it comes to a real world solution so you can get up to speed with their approach and go from there.
Performance wise yes - downloading the derivatives (SVFs) to the client side would certainly improve load times - you can either see here and here to download, store/package locally and override request handling of WebView to load them (as Viewer only supports http(s) and not file or other protocols) , or cache the resources with Service Worker following here and here.
You can look around SO for other performance related questions - mostly they are about setting the memory options, correct FPS targets, consolidating geometry, selective loading and adjusting navigation options - for specific issues you can post another question or email forge.help at autodesk.com for assistance.
It is okay to open the dwg file less than 1mb very soon, but if the file is larger than 1mb, it will take some time to load and is hard to zoom the viewer.
I'd suggest to download or cache the derivatives (SVF) locally to boost loading performance. I was unable to reproduce any difficulty with zooming - did you set viewport in head meta tag?

Google Places iOS - App size is too large

I want to integrate the google places autocomplete service, in an iOS app. The problem with Google Maps SDK for iOS is the size of library. After install Google Maps(include Places) the increased the size to 130MB (before only 25MB).
My question is: is there some way to reduce that size? if not, how is a better solution to looking for an address? (with autocomplete)
Regards
To check the file size of the app in Xcode 8 and up.
First go to
~/Library/Developer/CoreSimulator/Devices/
and delete complete folder and build the application. Now you only have two folders specifically related to your current app.
First folder is the one in which you should be interested.
[First folder]/data/Containers/Bundle/Application/[Application
ID]/[app Name]
I believe you are concerned with the application's size, not the project.
The 130MB is the size of your project, not your Product/App. You can check the size of the app in your iPhone settings or if you use simulator:
/Users/[username]/Library/Application Support/iPhone Simulator/[simulator version]/Applications/[appfolder]/[product name]
If you are concerned with the project's size you could use Swift solution instead of downloading the whole Google Places API:
https://github.com/watsonbox/ios_google_places_autocomplete

Large app size in AppStore. Is it allowed to download external assets?

I've developed a game, it's total file-size with all assets is about 220Mb.
The game is developed in Haxe language with a framework called openFL - that allows to compile iOS and Android versions from a single source.
Because Android's Google Play doesn't allow apps larger than 50Mb in one go, I've separated the graphics assets and sounds from the code, leaving the app at about 1.5 Mb. I don't want to make a separate branch for iOS, so I'd like to use the same logic for App Store as well.
My question is - is it allowed to download the external assets for iOS similar to how Google play does it? Will App Store host these files for me?

Where does iPad app store data?

I have an iPad app that downloads PDF and audio files. I though these might be in the .ipa file (I used this thread ipad - extract images from application?) but I didn't see anything there.
Is there some way to find where these might be stored on a Mac (after syncing)?
Normally in many apps the media files will be downloaded to documents directory of app, which is inside the sandbox for the app. Simply telling when you instal a app OS will create a sand box, and all the data will be inside this sand box and only that particular app will have access to this data. So you will not be able to copy data.
Hope this answers your question.
The IPA is an application only. Once it is installed on your iPad, it becomes a "package". It does contain the data within that package with some apps that store locally. There is no Apple supported way to get to this data directly. Think of it like this. The IPA is kind of like a blueprint for a program. Like a blueprint for a shelf, I could build the shelf but the books wouldn't be stored in the blueprint. Only the shelf. When you install the app, the iPad builds your "shelf".

ios native app allowed to save data from web?

We're building an iPad photo gallery with hundreds of images (almost 300mb in size). Having a web app will be a disadvantage because users will have to download the images every time (since Safari on ipad won't cache them I'm guessing?)
So if we built a native ios app instead, would it be possible to download newer images from the web and add it to the app in the future?
Thanks a ton for your help !
Each iPhone application has its own home directory containing Library and Documents folders, and a tmp directory for storing temporary files.
Take a look at section title: A Few Important Application Directories on The Application Runtime Environment.
I would save the your images to Application Home/Library/Caches folder.
Excerpt from Apple Docs:
Use this directory to write any application-specific support files that you want to persist between launches of the application or during application updates. Your application is generally responsible for adding and removing these files. It should also be able to re-create these files as needed because iTunes removes them during a full restoration of the device.
In iOS 2.2 and later, the contents of this directory are not backed up by iTunes.
http://iosdevelopertips.com/data-file-management/save-uiimage-object-as-a-png-or-jpeg-file.html
you could download it on first view, display at the uiimage, then save it off as above

Resources