29
votes
Accepted
Rest APIs - mobile specific challenges
The API being designed follows the Rest style of resources-centric URI and CRUD operations mapped to HTTP verbs.
This is your problem right here.
You have limited your resources to (I'm assuming) ...
- 4,952
12
votes
Accepted
Unit test which asserts that current thread is the main thread
Let me show you my favorite unit test principles:
A test is not a unit test if:
It talks to the database
It communicates across the network
It touches the file system
It can't run at ...
- 97.7k
10
votes
Accepted
Who is responsible for setting color in MVVM?
The View is the place which has intimate knowledge of your graphical runtime environment, of how color is expressed in it, and even of the fact that you are actually running within a graphical runtime ...
- 31.9k
9
votes
Why are there no cross-platform mobile applications?
As the co-founder of Codename One which does pretty much that I can answer that pretty easily.
You can cross compile (which is what we do) but you can't have a single binary that will work everywhere ...
- 191
9
votes
Accepted
Unit Testing in VIPER Architecture: Possible?
Oh it's possible. It just doesn't look like what you want it to look like.
What you're complaining about is the use of output ports1,2,3 to communicate results rather then returning results. Does ...
- 97.7k
9
votes
Accepted
Keeping version parity between platforms
When most of your code base is shared for both platforms, I would avoid getting version numbers "out of sync", because it will bring a lot more effort for writing a coherent changelog or ...
- 194k
7
votes
Usage of MVVM in iOS
I am only just approaching these questions myself but I will give the best answers I can and make some observations.
We are told that iOS' MVC expects us to break our program up into models, views ...
- 2,993
7
votes
How narrow should my unit tests be?
The question you should actually be asking yourself is this: is my code testable? If you find yourself writing elaborate tests or using elaborate mocks in your tests, it is the fault of the code ...
- 198k
7
votes
JSON API or Plain JSON
I'm not interested in JSON, I'm interested in the objects that are created from JSON. Like in your example, turning plain JSON into objects is easy. How difficult is it for new developers? Mostly they ...
- 40.5k
6
votes
Accepted
Is Apple sample code the "correct" way to go?
Apple's sample code is just that, sample code. No guarantee that it works, that it is bug free, that it is the best way to achieve something. Use it to study some area that you don't know much about, ...
- 40.5k
6
votes
How do I create my own Objective-C to Swift converter?
This is a pretty big task. But then again, so are most things worth doing in programming. We start by breaking it down into smaller and smaller tasks until we get them down to the level of a problem ...
- 81.9k
6
votes
What is a good approach for saving a Swift model that's a struct containing structs to Core Data?
You have some options:
1 - Convert them to class. So you can inherit from NSManagedObject and do the rest like the tutorials you usually find in internet.
2 - Make a rapper around any struct you ...
- 381
6
votes
Accepted
In mobile games that work across android and iOS is game logic written twice?
Three words: cross-platform compatibility.
If you write your game in HTML and Javascript, it will run on any platform where there is a web browser on the device (which is most devices nowadays). If ...
- 198k
6
votes
Can you modify the front-end source code of a mobile app?
It's not just that people might be able to hack into your front-end app. They might be connecting directly to your server with an app that they wrote themselves.
I can get around whatever security ...
- 40.5k
6
votes
Accepted
The right place for "app logic" in MVVM context
In MVVM, the business logic is built into the Model. The ViewModel is there to bridge between the View and the Model, so it's logic only pertains to driving the display and updating the model from ...
- 45.4k
5
votes
Accepted
How do you write tests for methods that interact with data in system files?
You have to mock or emulate, and you have two very good reasons to do so.
You have to mock or emulate whatever parts of the system your code interacts with, precisely because:
You don't want to ...
- 31.9k
5
votes
Accepted
IOS app updates that don't require App Store submission
Apple now explicitly allows interpretted code like Javascript to be 'Hot Code Pushed' to a device without an update.
3.3.2 An Application may not download or install executable code. Interpreted ...
- 166
5
votes
Can I use GitHub as my mobile app's data store?
I'm reading the Term of Service of the site and i think that you can use GitHub to host your JSON file.
But pay attention to this point:
If your bandwidth usage significantly exceeds the average ...
- 421
5
votes
Accepted
What would cause a company to need to move their app on the iOS App Store to different "app"?
If one builds an app with 64-bit support using current versions of Xcode, it is no longer compatible with iOS devices running iOS 5.0 or earlier. Perhaps a developer wants to separately support ...
- 7,948
5
votes
Accepted
What should a rest api return for an empty guid?
An 'empty' guid is still a valid guid, so parsing it shouldn't require any extra logic.
The question is why are you using it at all? It seems like a mistake to me to assign special meaning to a ...
- 68.7k
5
votes
Accepted
Why JS MVC frameworks prefer data binding to UI element reference?
The purpose of data binding is to decouple the view from the model. Neither the model nor the view should know about each other. Data binding is the glue that connects the model to the view and ...
- 198k
5
votes
Push notification from web application to my mobile app
There is no need to reinvent the wheel and there are plenty of solutions out there that makes pushing notifications to mobile devices easier.
I personally would recommend Firebase Cloud Messaging by ...
- 181
5
votes
Accepted
Can you modify the front-end source code of a mobile app?
Yes of course.
People like to think that because a lay person can't read the source code for compiled or even "transpiled" applications in the same way you can with javascript on a website that it's ...
- 68.7k
4
votes
Private apps for iOS and Android
You can develop and distribute private apps among selected clients.
In iOS, ad-hoc distribution is there, but you'll need to hook up your mobile device to a Mac OSX. Ad-hoc distribution is possible ...
- 41
4
votes
Accepted
Does key-value observing between model and view violate MVC?
No, having the View observe the Model (or perform other read actions on the Model) is a valid implementation of the MVC pattern.
There are two main ways that the MVC pattern is typically implemented ...
- 70.2k
4
votes
Accepted
Testable design in Swift
I think you're running into a common pain point while testing and one of the reasons I dislike singleton implementations. Injecting these repository instances is a useful pattern allowing you to ...
- 756
4
votes
Accepted
How to deprecate an entire mobile application?
If you're decommissioning the backend and making the app unusable, then you should provide the users an update which notifies them of the service being decommissioned. Give them a fixed date for when ...
- 166
4
votes
JSON API or Plain JSON
JSON API is nice, but complex spec. Its implementation is also not easy, especially if you don't have good library implementing it.
So it's mostly a question "is it worth it for our use case"?
In ...
- 2,836
4
votes
Making profit using OpenCV?
The About Page says:
OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in the commercial products. Being a BSD-...
- 1,380
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ios × 411android × 85
iphone × 60
objective-c × 58
mobile × 45
design-patterns × 34
swift-language × 29
mvc × 26
appstore × 23
architecture × 21
apple × 21
xcode × 21
design × 19
app × 15
object-oriented × 11
licensing × 11
api × 11
unit-testing × 10
ipad × 10
object-oriented-design × 9
web-services × 9
database × 8
testing × 8
mac × 8
rest × 7