how to upload picture and event in my Published App Xcode 6 - ios

i am New user for Xcode in swift and i published my app to App Store. i could only connected with Parse ( Push notification Service )
but actually i want in future to change the background of my App or to add New Event. i know it is possible to do all this things with backend service but i heard that i have to design the code in parse, there is anyway to find the sample codes like push notification in Parse or somewhere else?
i will really appreciate if someone can help me.

"I want in future to change the background of my App or to add New Event"
These are hugely different scenarios.
Its pretty trivial to use Parse to change a screen background. Just save your existing background image as a file (eg as a UIImage) in Parse, and have your app download the image from Parse and set it as the background image of your UIView. Change the file and all users will see a new background. You would need to do this when the app loads (or at least before you access this screen), or else there will be some annoying delay when you access the screen with the new background image.
Adding a new event sounds close to impossible, as it involves modifying your code. But your compiled code is "signed", and as such is designed by Apple to be impossible to change without going through the market. Any app which could do that could bypass the market and potentially directly download malicious code. And nor (as far as I know) does Apple provide any support for extending or changing code within iOS. If its not actually impossible, I expect it would be so difficult and require so much knowledge of iOS as to be infeasible for the average programmer.
EDIT: You have now clarified as to what you mean by "Event" in your comments. This is just data which you load dynamically (and not an "event" in the programming sense). Yes you can do this through Parse (and lots of other ways), just read/load the data through Parse. Very easy to do, have you read Parse's excellent tutorial?

Related

iOS background tasks synhronization app flow

I'm programming in iOS not so long. I was mainly programming UI related stuff like animations, custom UIControls etc.
I need in my new app to:
Display loading activity indicator and in the same time:
load some remote data from server parse them and store in local core data
load some data from local core data
get user position from location service
After this I have all data needed to display next view controller and dismiss loading indicator.
Question is how can I do this all? I need to support iOS9, iOS10, 11, 12. I understand that this needs to be done in background threads and then I need to merge all data from each task and switch to next view controller. I can't use any external libraries like rx-swift or promise-kit. Maybe there is any experienced iOS developer who can give me some main guidelines how to approach to this kind of application flows? I can imagine there is a lot of ways I can do it some of them are better and some of them are worse. Any guidelines would be very helpful for me. Thanks.
It's a very complex question and as you said it's possible to solve all this problems in several ways. But for sure i can give you some core-hints about which steps is better to follow:
Run in a separate thread the management of all stuff regarding to the Network communication. Maybe you can run it on a separate queue using the class DispatchQueue(). Once you received the data, in the same thread, maybe you can directly convert these information and store them inside a CoreData database.
To store into CoreData you need at first to know how it works, so basically search for some really easy tutorial about how to create from zero your first database inside XCode. After you have been able to run and execute a very simple one you will be able to pass to the second step and so try to integrate it with the data you have previously downloaded from the network. Here a good article for you: https://www.raywenderlich.com/7569-getting-started-with-core-data-tutorial .
To get the location is a separate field of study, because you have to study which background modes are allowed in iOS (And actually are allowed just a few). After that you will need to figure out in which category of background-location application your software belongs. After that you have to dig deep and discover how protocol and delegates works inside Swift/Objective-C in order to properly manage the last location value retrieved by the sensors. Here is a good article for you: https://www.raywenderlich.com/5247-core-location-tutorial-for-ios-tracking-visited-locations.
At the end when you interconnected all this flows you can think about how to display the loading indicator. Basically you need to drag and drop it from the tools into the storyboard, interconnect it by using the IBAction or IBOutlet, depending on when you wanna show it and in which specific case. And then use the relative method startAnimating or stopAnimating in the right code flow (It really depends on how you have structured all the previous bullet points).
Since your question was very general and it includes a lot of sub-steps, basically it really needs to be thorough studied and analysed.
I've tried to sum up as much as possible the most important bullet points. I hope the links i suggested to you will help a little bit. Good luck.

save to local storage swift

I am designing an idle clicker style app, as I am quite new to programming and thought it would be a good personal project. However I am trying to design the upgrades on a second ViewController menu, however every time that the user leaves the first ViewController, all the settings on that page are lost e.g. stats. I know that there are already similar questions, but they don't relate to my issue and I am having difficulties trying to understand them.
I was just wondering if someone had any way to save this progress both when the user moves to a new viewController and when the app is closed and reopened. Also this might be pushing it, but if you could describe what each part of the code does it would be very helpful.
Thanks
Best is to use UserDefaults to store page contents. You can define key/value pairs and save and load values as needed. Look for it in the IOS documentation. It is very easy to implement it.

iOS - make changes to app without requiring update via app store?

This may seem like an odd question, but I'm in the middle of creating an iOS app, and was wondering if there is a way to, in the future, roll out changes to the app without requiring all of the users to download an update.
I've noticed that Snapchat can do this with their filters - new filters are added regularly, without me updating the app.
I've read into 'Cloud code', something Parse had that apparently let you accomplish this. Obviously that's no longer an option.
Also, do Apple even allow this? Seeing as they need to approve every app before letting it onto the App Store, it would seem like they would need to approve any changes first too.
I've thought of strange things like storing a function in a database, then getting the app to download that function and run it - naturally if I were to now change the function in the database, it would change on all users devices instantly. Just how ridiculous is that idea? Thanks!
Depends on how much flexibility you want.
For example, Spotify does this for UI mainly - backend-driven UI, as they call it. They send a kind of layout from the server and convert it to a real iOS layout, based of a predefined mapping. You can find pretty more details in the Spotify's presentation.
Slides: http://www.slideshare.net/JohnSundell/backenddriven-native-uis
Video (more details): http://www.downvids.net/backend-driven-native-uis-john-sundell-and-diego-cristina-ca--777281.html
So actions can also be divided in similar pieces and abstractions, received from the server and interpreted - sort of scripting is needed. You can't compile and run arbitrary functions on the fly.
Hope it'll give you some ideas you can think of.
See Apple's app store review guidelines: https://developer.apple.com/app-store/review/guidelines/ section 2.4.5 (iv). Apps are not supposed to download code or resources to add functionality or significantly change the app from what Apple sees during the review process. And executable memory isn't even writable by sandboxed apps, which makes downloading compiled functions fairly useless. But downloading Javascript that complies with the above guidelines seems to be allowed.

Chaning iPhone app colors without resubmitting to app store

So this is a hypothetical question that I'm just trying to keep in the back of my mind as I go into learning to develop apps.
I haven't made an app yet but I've had a few ideas and features that I think would be cool in some of the apps I have ideas for.
That being said I'm wondering if there are any possible solutions to being able to change the overall style and theme, or just colors of an app that is already on the app store without updating assets and having to resubmit and thus update the app.
I've never gone through the process off submitting an app to apple or pushing changes so maybe I just don't know enough on how it works but I assume that if you make a change, be it minor or major bug fixing you have to resubmit to apple and once it's live all the devices that have the app installed will be prompted to update correct?
If that is the case is there an solution for doing the above without having to go through that submission process?
Let me give a quick example. Lets say I have an app that has a header with a background color an inside it there is a logo and maybe a menu icon, then there are headings and other formatted text throughout the app that all have a similar color to the header. Some time goes by and the World Cup has begun in brazil, the greens are really cool, and I think my users would have a little kick out of a temporary color scheme change to celebrate the games. I want to change the header color and link colors and maybe my logo color or even a new football themed logo all together without having to push my app to the store again.
I'd be curious to see if it can be done and how one might go about it.
Yes, It is can be done. Using Web service to get the image, colour or even frame value.
Firstly, You need a default theme in your application for those who cannot download other theme. If there is something wrong or no internet, then you can use it.
Secondly, Just download theme from web service and store it. And then show your new theme.
To piggy back on what brian said, try using Parse. You can upload all of your images and have it download from there. Parse makes it extremely easy to do something like that!
The way to do this would be to host the stylesheet for your App on a web server, rather than packaging / hard-coding it in XCode, then you could just edit the stylesheet on your server and all Apps referencing it would update as well.
You could do the same with images and such for your logo.
Word of caution, with larger images or many images your App's performance may suffer depending on the number of HTTP requests being sent, meaning if your App goes viral it will probably run slower than if the stylesheet / images were packaged in the App.

Understanding Newsstand App

I have a big question about how newsstand works.
When you have to create a new magazine(issue), how do you do it?
I mean, Do I have to implement new code for each magazine (with new views and new view controllers) which doesn't look the same as the others and has interactive content? In this case, how do I add/upload/integrate them to my newsstand app which is already in the market?
In the case that It doesn't work in this way, How does it work?
Thank you very much in advance.
Your question really goes to the heart of how Apple has chosen to implement Newsstand. Basically, there are three possibilities for using Newsstand: use image/pdf content, use HTML5 content, and use the CoreText native API.
I take it from what you are saying that you would like to use the CoreText API. This is difficult to do in the Newsstand framework for the reason you suggest: you really are not supposed to upload a whole new app with each edition.
There are two possible solutions. The first is simply not to use Newsstand. Instead you can publish your magazine as an app, and simply upload a new app for each edition. This means you miss out on things such as subscriptions and the "double-listing" promotion of Newsstand, but you can make high-quality, native, custom interfaces.
The second is to do what I am in the process of doing right now, which is to develop something like an XML encoding that when loaded into your base app will generate the kind of interface you want.
At least that is my analysis so far. I would be so pleased to be told I'm wrong, really. But I do think this is one of those cases where Apple hasn't really thought through what they are offering. Maybe next year it will get better!
If you use the Baker framework you can download the interface elements (html, images) as "issues" and the code part (Baker framework) will stay the same.
To add a new issue you do the same as you do with downloading the PDFs using NKAssetDownload. If you're using Baker you will want to extract the whole "book" into the documents directory.

Resources