How to display images and texts dynamically using logics with Swift? - swift

I'm trying to build a sample app (using Swift 4), now I would like to add a function: To display images and labels dynamically.
For example: sometimes, I would like to display an image in the top of a ViewController, just like the following picture shows:
But sometimes, I would like the display the image in the bottom of the Summary label, or some other positions.
Is there any way to make it happen? And the most important is: There is no way to modify the codes, once the app submitted to App Store. So, the logic may be implemented from internet? I'm not sure about this. Thanks.
PS: I'm using AWS Mobile Hub (AWS S3, AWS Dynamodb) to retrieve images and items.

There are few options, check out rollout.io
You can create this screen in react-native and you can upload your .jsbandle on the server, so whenever you want to change this behavior just need to build your react-native project and replace the .jsbundle file on the server.
Look at this blog for detail.
https://medium.com/ios-os-x-development/so-you-want-to-dynamically-update-your-react-native-app-d1d88bf11ede
Note: Apple review team may reject your app.
Your app, extension, and/or linked framework appears to contain code designed explicitly with the capability to change your app’s behavior or functionality after App Review approval, which is not in compliance with section 3.3.2 of the Apple Developer Program License Agreement and App Store Review Guideline 2.5.2. This code, combined with a remote resource, can facilitate significant changes to your app’s behavior compared to when it was initially reviewed for the App Store. While you may not be using this functionality currently, it has the potential to load private frameworks, private methods, and enable future feature changes"

Related

iPhone app - Review guidelines - Contest rules

i've just had my iPhone app rejected on the 20.2 statement of the Review Guidelines:
Official rules for sweepstakes and contests, must be presented in the app and make it clear that Apple is not a sponsor or involved in the activity in any manner
Now, I have a problem. In my app I will have more than one contest, even if all based on the same ground rules. Can I put these rules in the app (like in a UITextField) taking them dynamically form a server? In this manner I could specify, for exemple, the specific period of time each contest would last without having to chose them right now... Do you think that this would be accepted or I have to put those rules directly in the bundle?
Thank you
it would definitely be accepted...
but, a web view would be better than a text field... open an html hosted on your server in the web view. You can add rules and declaration that apple is not involved in any way in that html and change it whenever you want... with html you'd be able to add images (or even videos .. HTML5?)...
you can also include a default html in your app which would open when theres no connectivity...
In way you have already done you are able to violate apple guidelines at any moment.
Consider updating your app instead of downloading contests from server.

Download additioanal functionality into an app - is it possible?

I'm currently developing an iPhone version of existing Android application.
Customer wants to provide his web services via mobile apps. On Android this is made in a modular way: user installs main app, and then he can download additional modules to it if needed. That way he can install only modules that he needs.
Is there a way to achieve same functionality on iPhone? I read about In-App Purchasing, but I don't know if it will work because additional functionality will not be built-in and unlocked - it needs to be downloaded and added to my app as a new module - so user's space would not be wasted with unneeded modules.
Thank you!
2.7 Apps that download code in any way or form will be rejected
From App Store Review Guidelines
Judging by the question, this is not a world-facing app - it has a specific customer. With Terente's answer in mind, do consider side-loading, AKA in-house distribution. That is - bypass the app store. The prohibition on the downloadable code is an App Store policy, not a limitation of the platform.
The enterprise contract with Apple is $300/year instead of regular $100/year. But you get to install your app on as many devices as you wish, completely bypassing the App Store. Either over the air (by browsing from the phone) or via iTunes.
Under this model, your app can download, store and run custom code all you want. The specifics of the plug-in model are up for you and your customer.
EDIT: so app store is a must. How about this: have a WebView in the project, have it download HTML pages with JavaScript in them, have code hooks for JavaScript to call. To the best of my knowledge, AppStore does not reject apps that display Web pages from the Net, and if the Web page happens to have a script, there's no prohibition on executing that script.
This violates the spirit of the rule while relying on letter and precedent. Technically speaking, JavaScript IS code. And again, technically speaking, WebView is capable of downloading and running it. And App Store is choke full of apps with WebView in them.
How will this fly with your customers, who knows.

Possible to load an iOS app inside another iOS app (via in app purchasing / subscription)?

Long story short, we're building interactive content in Flash that we'd like to package and make available through an iOS app (either via in-app purchasing or subscription, or both).
Flash obviously can output standalone iOS apps, and in our tests for our purposes this packaged output works well. So rather than completely re-writing our content in HTML5 (so it could be loaded via WebkitView) we're curious if there's a way to serve a fully packaged app as in-app content?
If not, any other ideas how we could do this without completely rebuilding our interactive content? And if we do have to do that, is HTML5 the only option? Anything else that will make the port from Flash to ready-for-iOS less painful? (The Flash -> HTML5 porting tools are dreadful).
Thanks!
No there is not. This goes against the security policy iOS enforces of apps.
In terms of what you can do otherwise, it's really difficult to make any suggestions when you're not providing any details. The best I can suggest is include this functionality in your app, but disabled. In-app purchase will just download some sort of unlock code which can be used to make it available in your app.
Afaik something like this can not be accomplished by creating several apps. You would have to pack everything in just one app, and then make some parts of that app available as in-app purchases. As this is realized through specific SDK functionality, if your tool for compiling the flash to iOS-ready code doesn't support it, you are pretty much stuck there.
In case the tool produces human-readable code from your flash, you can add the in-app purchase manually.

Automatic Update of IPhone App

I am new to iPhone automatic updatability feature where user can change their contents whenever they want and iPhone app should pick them so that one need not to resubmit the application into Apple store. I know that I will need to deal with the database here a lot but if someone could through their idea on the solution design, implementation, and things to be taken care then that would be really helpful to me.
Thanks.
"content" here really means data. Apps can load data over the net to their hearts' content, but they can't load new code. Now, certain data might cause the existing code in the app to do one thing or another, so the app's behavior can be influenced by the data it uses. Don't play too close to the line, though -- if your data is really some form of scripting language that directly drives the behavior of the app, that will likely be deemed unacceptable.
As far as loading the content goes, there are a number of options available. The most common is probably using NSURLConnection asynchronously to load data from a web server. What the app does with the data after that is up to the app designer, and I don't think there's one objectively correct answer to that sort of question.
Apple not only allows this, but presented a session on this data driven app design technique at WWDC 2010, which is available as a video from iTunes to enrolled iOS developers.
Of course, the downloaded "content" can't include executable code, but it can include JavaScript and HTML5 to be run inside UIWebViews, as well as images, sounds, text, databases, etc., which can all be stored for offline use.
This violates apples SDK Agreement and will likely get your app removed from the app store if caught.
It should be mentioned that web apps offer the ultimate in automatic content updates. You can change the content, structure, and features of a web app without ever having to submit your app to Apple or anyone else. Deploying the app is as simple as copying a set of files to your server, and users get the updated version immediately, even if they're currently using the app. Web apps aren't a perfect solution in every case, but their capabilites are compelling if your app is dynamic.

What are the wise and allowed ways to add advertisement to iPhone App?

I will be publishing an App in a few days. Initially I don't want to add advertisements, but can change my mind anytime, so I've thought this. Add a WebView to application and set its image to a dynamic web content. If no ads; I will display a simple logo, but when ads are available, replace the content with them. So there will be no modification to iPhone compiled binary.
Do you think it is allowed by Apple, and a good approach?
If you follow that approach, you will need to at least explain to Apple when you submit the app for review that ads may be enabled via a webservice.
Apple won't like it if you don't tell them that you might modify the apps feature set or behaviour after its approval.
You should be OK as long as you tell them about it.