Xcode for app approval by Apple - ios

I have a rather long app, about 20 pages and some of the code should probably be re-coded, my first app with Xcode and I learned a lot along the way. I could add a few objects to replace string arrays etc and make the code more readable. I was wondering if Apple looks at all the code when submitting to the app store or if they just want it to work with no errors. So I guess the question is ... should I 'fix' my code before submitting it?

I don't think Apple can access your code unless they can decode your binary app back to source somehow (It is very difficult to do that). They do perform some testings on your binary project (such as networking) and play around your app a little bit to check if your function provided is valid and works as described without any serious bug.

As long as your app works and does not violate any of the App Store Review Guidelines you should be fine, you can check the Review guidelines here to get more information about the review process and what Apple expects from your app.

Related

Will Apple Reject If I open containing app from share extension?

I am using the solution provided here to open my containing from the share extension. It doesn't seem to use any private API way to do that despite that it is fragile.
Will Apple reject my App if I use it? Anybody has an approved app that open containing app from share extension? If so, what is the right way to do it?
Any pointer is appreciated .
Though there are loads of questions on how to open containing/parent app from share extension, none actually talk whether the proposed solution/hack will be approved by apple or not in detail.
One such example is
Share Extension to open containing app
suggests that Share extensions are not supposed to open the container app.
While browsing some time back, I rather found a very interesting thread discussing the same topic here
https://forums.developer.apple.com/thread/27295
The thread questions, whether the hack of traversing UIResponder chain to open the parent app using openURL will be allowed by apple or not? (Precisely the same idea shown in your posted link as well).
Though the thread again does not provide clear answer as, whether it will be approved by apple or not but points out a very valid concern and warning
The fact that +[UIApplication sharedApplication], and hence -openURL:, is not available to extensions should be an important hint here.Ignoring that restriction and looking up the symbols via the Objective-C runtime is not a good idea.
Clearly, thread suggests (implicitly, by not clearly stating the fact that apple will reject the app with such hack) that though apple will approve the app for now, it will only be a temporary solution.
Now this finally leads to the answer:
Answer:
In a recent apple event held # Bangalore, I had an opportunity to meet the developers of extension team # apple. I told them that I have been using the above mentioned hack to open the app from share extension will this be allowed by apple?
His answer:
`UIResponder`
is not a private entity, hence usage of UIResponder will not violate the private API usage condition hence apps which are using the above hacks are still being approved by apple. But the fact that, your code parses through the UIResponder chain to trigger the openURL is very costly and not suggested/preferred.As Apple seems to be aware of developer using it, they might start rejecting the app in future. (Must say, he wasn't sure of the last point, apple rejecting app in future hence highlighting might)
He also happened to mention about usage of WebView to open the app which developers used quite sometime back as well. Which is no longer working.
Conclusion:
Yes you can submit the app which opens the parent app from extension using above hack but being completely aware of the fact that this is only a temporary solution and apple expects you to write completely independent share extensions
Question is Answered for current iOS version of iOS11. The answer might lose its validity with future releases of iOS

How to push Swift code to client through server in iOS?

I want my app to make urgent security updates without going through Apple's review process. I am not trying to do this for all my updates, or circumvent Apple's reasonable review requirements. All it would have to do is push a .swift file to the client, which would be accessed somewhere in the app.
I definitely know there is a way to do it in JavaScript, as I already made a mechanism of the same type in a React Native. I used this approach, but I don't think there is an equivalent for iOS from what I've heard.
There definitely is a solution, as I've heard many devs doing this (for less, um... valid reasons) but I can't find it.
You cannot do this, for both technical and policy reasons. Apple expressly forbids you from delivering new code to your apps's outside of the app store process.
The other part of it is that your apps run compiled object code, not source code. Aside from the iPad Swift playgrounds app, there is no Swift compiler on the user's devices.
Javascript is a horse of a different color. That's an interpreted language, and is designed to be delivered and run dynamically.

How to get crash logs of Testflight external testers on Xcode or iTunes connect?

Is there any ways to know what's wrong with someone's app. It is working on everyone else's device but this person.
The person tried removing the previous version and installing the new one, but it still does not work. I suspect that one of the files that I place in the documents folder might still be there... but the format of this file has changed since...
Apple has a technote about this named Debugging Deployed iOS Apps.
Also, if your tester syncs up their iPhone with a Macintosh or PC, iTunes also helpfully moves logs into predictable places where they can be retrieved from.
I am attempting to solve this logging of execution in TestFlight with the following simple approach...
In in-App Billing you really have to use TestFlight, so the problem is serious.
The "print("text") statements can be replaced in the code to calls to a func printTestFlight(text: String) which writes the strings to a database along with some identifier so you know the user.
This is quite simple and obvious, and to an extent it works.
If there are events which are logged by the os rather than teh user, then this approach misses those, notably the interesting ones around a crash. I'd be happy to hear from anyone who knows how to do thiso

unused code in xcode project - app store update submission

I'm submitting an update to my first application on the iTunes (update 1.1). I was wondering if it would be an issue if I left code in the project that went completely unused.
I have two examples:
I will be doing localization in the update after this but I've
already put in NSLocalizedString and the localizable.strings file.
This really isn't necessary at this point until I get back
translations and I submit 1.3. So currently it's just English.
Next is I'm trying to add "log in with Facebook" to my application. It works perfectly when the user logs into Facebook with apple settings. Unfortunately, if they don't log in via apple settings and only directly in facebook application. when they select log in with facebook on my application I'm getting errors.. I'm still researching how to fix that (super frustrating) but my question is if I just disable/hide the button in my app will apple care that I have a method and hidden button that isn't called/used?
Should I comment out the unused code? or will apple not care that there are unused methods?
Thanks in advance,
James
Apple doesn't care about your code. You can submit it.
They don't care about unused code, as long as you don't use anything that's from private API or so. You can go ahead and submit.
It won't matter as long as your code isn't impacting the stuff that is working. In many cases the dead code won't even be compiled; if it really concerns you, can you force the compiler to perform aggressive dead code stripping.

Submitting webapp launcher to Apple Store

I have never developed for iPhone, but I have developed an HTML5 web application.
I would like to submit to the Apple store a free app whose job would be to just open up the HTML5 webapp in the mobile browser.
Do you think it will be likely that such an app can be accepted? Can you please provide links or evidence?
Is it possible to ask this question to the Apple team so that I am not going to waste $99? If so, how?
If your app has native web views pulling internal HTML5 information, you might be able to sneak it by some of the app reviewers, but a good portion will say that there is not enough native Apple code in the app. They are sticklers for that.
I have, on a few occasions, gotten away with adding push notification, saying it HAS to be an app, and can't rely on users going to the website since they need push (even though I never intended on pushing anything out), but Apple has caught on to this.
Ultimately, you need to use Apple code in xCode, and you need to use a lot of it.

Resources