script the released version of my iOS app? - ios

I have a released app. I would like to add a help functionality that runs a few simple scripts. In other words, it programmatically highlights a button, presses it, highlights another button, presses it, and so on. Is there a sensible way to do that?
I'm thinking of something like UIAutomation. However the Apple doc linked above indicates that it requires that the app be code signed with a development profile. So it won't work in a released app.
I'm not going to add somebody's library to do this. So if the answer is that you can do it, but you have to either write a lot of code or link a third-party library, it will make more sense for me to hard-code everything in Objective C.

first:
Apple forbids App Store apps to interpret code so real scripting isn't allowed AFAICS but anyway:
technically:
if you don't want a ready made 3rd party lib
you'd need to write a lot of code (though a lot is relative ;)
=> if the 'scripts' are simple, hardcode them in objC.

Related

how to build micro apps in iOS

We have a requirement to build apps within an app, like how we have a main app called, Google and when we click the app icon, we get options like gmail, chrome ...and those apps function independently..How to organise these apps within the main app.
Could anyone give some basic idea on how to build micro-apps for iOS.
From my point of view, there is no such thing as a "micro app". What you seem to want to achieve is put various functions in one single app, what is not a good idea.
Thinking about your example with Google, they arent doing what you are mentioning. If the functionality is big enough, they put it in a seperate app (gmail, maps, ...). Same goes for you.
If you really want to go that way tho, i would highly suggest to make seperate storyboards for every "micro app" to keep things easier to maintain.

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.

How to create an iOS app add-on?

Is it possible to create an API inside an iOS app to let 3rd party developers create app add-on that are downloadable for users inside the app?
I could not find any ressources for this topic online.
I think that's going to go against the app store guidelines if your intention is that the 3rd party developers write code, which will be downloaded and executed.
There's something of a grey area between legitimate uses and illegitimate uses of downloaded code:
Legitimate Example 1: Something like Hopscotch where children are creating simple fun shared games. These can be considered user generated content.
Legitimate Example 2: A game which is driven by scripts allows for the run-time downloading of patches to fix bugs in the scripts or even to add new levels. I believe such usages have been rejected occasionally in the past, but are generally accepted these days.
The relevant guideline from the guidelines is (emphasis mine):
2.5.2 Apps should be self-contained in their bundles, and may not read or write data outside the designated container area, nor may they download, install, or execute code, including other iOS, watchOS, Mac OS X, or tvOS apps.
And the all-encompassing:
We will reject apps for any content or behavior that we believe is over the line. What line, you ask? Well, as a Supreme Court Justice once said, "I'll know it when I see it". And we think that you will also know it when you cross it.
If your idea is to create some sort of app-store within your app-store app, then I would abandon it immediately, because that's going to be way over Apple's line.
That said, you haven't given much detail about your app, so I might have made wrong assumptions about where you're thinking of going.

Does Apple allow the usage of sysctl.h within iOS applications?

Does Apple allow the usage of sysctl.h within iOS applications?
PS: App Scanner, a third party tool that checks code for possible private-API usage seems to think it's okay.
Note:
There is one more question like this : How can I know if I'm using private frameworks?
With the usual disclaimer that nobody can tell you what a reviewer will do, I can say for sure that there are apps in the store that use sysctl functions.
(Minor point: Simply including a header isn't a problem since symbols there shouldn't be visible in your app unless they're used...it's the things you use that might get flagged rather than what's included.)

Is it possible for a developer to jailbreak an app and look at its code?

I am designing an iOS app UI with a freelancer UI designer and was referring back an forth to an app that I like as an inspiration for my app design.
I asked my designer to design something similar to that app we are looking at, then my designer told me that the way to do this is by coding and not design and he claimed that he hacked the app and is looking at its code !
Is it really possible to simply jailbreak and app and look at its code ? If so then is it at risk that someone would simply copy the code and re skin the app and put it up on app store ?
Code gets uploaded to the app store as a binary so there's never any source code up there to begin with. I guess its possible that your designer is reading the binary somehow but that would be pretty unlikely.
Edit:
It turns out it is possible to load the app into gnu debugger and view assembly. Or to decrypt the app and use class-dump to get the headers. However the original implementation code is gone.

Resources