Getting warning while uploading application on Apple app store [closed] - iphone

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am new to this technology.
I am getting following warning while uploading application from Application Loaded.
Warning says "The app references non-public selectors in "App Name" instance, viewController"
Please help me solve this warning.
Thanks in advance!
EDIT
Image :-
EDIT :-
Will my application get approve?

Use App Scanner. It analyzes your .app file for private API method usage.
It will catch methods that have been named the same as a private API method, even if it has it's own implementation. Also, it'll catch #selectors inside methods (just like the official iOS automated checker).
App Scanner doesn't catch the case when performSelector: is called with a selector that is a private method. However, Apple's tools do catch that case.
Another Alternative APP Kit, though I haven't used it. Give it a try.
Check out this Q&A, if you haven't. How does Apple know you are using private API?. Looks Helpful.

What was the last thing you added to the code before you got this error? The error means you have a private API call, as my link above notes.
If you dont think it was your code, then it might be any of the included code.

#iPhoneDev: i guess your application will not be rejected due to this reason. Because i have faced this warning in one of my app, and it was accepted successfully. So no need to worry

I think you might have a function named instance somewhere in your code, such as:
+(id)instance{
return something;
}
.. maybe a singleton implementation? If this is the case, just rename it.
I've seen apps approved despite the fact that they triggered similar alarms, but why would you want to risk a rejection?

Search for viewController in your entire project and search if there is any singleton implementation.
Even if Apple approve you application, its not good to have non-public sectors in your application.
You can also use App Scanner
Hope it helps you

Almost certainly get rejected for this.
Just a guess, but search for "viewController" and see if you are referencing a private instance method, or perhaps a private instance variable via dot notation: .viewController

No, your app will be rejected like this. Definitely. Apple review team uses the same checks as Xcode plus a few more.

Related

2 Simple questions related to xCode and Swift for someone new to Coding

Being new to coding I have a few newbie questions I'm hoping someone could confirm for me.
in xCode is the Playground just for testing code. Whatever I decide to actually be used needs to be copied to somewhere else to actually use it?
ViewController.swift - How do I decide what should go here or when to make a new "file"?
Yes, playgrounds are for playing with code and experimenting and getting immediate feedback without the usual build and run cycle. However, coding in them is slightly different to normal app programming. One thing you'll notice is that everything is top down, so you have to declare something above where it is used first, which you don't have to do in normal swift apps.
What you should put in ViewController.swift... such a broad question. You might be better off reading an iOS programming beginners book or guide, than asking that here. You should become familiar with MVC for what you put in a view controller. Potentially, you could put everything in ViewController.swift if you desired - but it wouldn't be very nice to work with. The only thing I would put in ViewController.swift, is the code for the ViewController class. I'd create a new file per class I create, new file for a protocol (most of the time), new file for defining constants usually. It's up to you, but at least a new file per class.

Outlets are null in ViewDidLoad with mvvmcross

In my view.designer.cs my outlets are generated by xcode.
When starting debug I have a null reference exception on my properties when adding bindings, in the code bellow this.SampleText is null.
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
this.AddBindings(
new Dictionary<object, string>()
{
{ this.SampleText, "{'Text':{'Path':'VMText'}}"}
});
}
I noticed the following error in Application's output :
"Application windows are expected to have a root view controller at the end of application launch"
what did I miss ?
It sounds like you might have a more general problem with your iOS setup - possibly some issues with the XIB file synchronisation between xcode and MonoTouch.
Before you try to add the MvvmCross binding take a look at the MonoTouch layer - if this.SampleText is null in the MonoTouch layer then you need to solve that before you can add the MvvmCross binding code.
The MonoTouch soft debugger is an excellent tool to help debug this - and the debug cycle with the simulator is pretty quick - so this often helps solve these problems.
From your partial answer to this question, it does sounds like you were trying to use a XIB in a Dialog based UI - that's probably not going to work - I think MonoTouch.Dialog is always based on a single Table - so it's not expecting a XIB (at least, that's my experience!)
As for "Application windows are expected to have a root view controller at the end of application launch" that sounds more like a general problem in your AppDelegate.cs perhaps. Alternatively it might be a problem in the presenter. Which presenter are you using?
That error message itself has a lot of hits on StackOverflow - e.g. Applications are expected to have a root view controller at the end of application launch - but I'm not sure which of these is appropriate to your case right now.
I must admit everything is not clear for me with iOS and MVVMCross
For coders coming from a C# background I don't think this is unusual - I think the jump from VS on Windows to MonoDevelop on Mac (with a little xcode) is a non-trivial leap. It takes more time to switch from WP to iOS development than it does from WP to Droid - this is the case independent of whether you use MvvmCross - if you are doing MT development you are doing native code, so you do have to take some time to understand iOS a bit (in my experience/opinion!).
For the most part, I've personally written tens of thousands of lines of code, authored hundreds of blog posts and stackoverflow answers, and presented maybe ten sessions on mvvmcross. I've done this across five distinct operating systems, four of which I've learnt as I've coded and all of which I've battled against platform and tooling bugs and idiosyncrasies.
I'll continue to post as much as I can - and continue to operate for 'free'
I do also encourage every user to post and blog about their experience too. In this way I hope knowledge will be generated and shared. To anyone who is reading this, using mvvmcross and learning something about cross platform coding - good or bad - then please do consider sharing that knowledge. For inspiration, check out some of the presentations and blog posts users have written - I try to list them on http://slodge.blogspot.co.uk/p/mvvmcross-quicklist.html. Thanks :)
Also, when asking questions, please can you indicate which version of mvvmcross you are using and which sample(s) you're basing your code on - there are differences between master and vNext and there have been fixes over time - so posting this info will help me try to understand and/or replicate the errors you are seeing.
Thanks :)
I know this is a little old, but I was just having the same issue.
My outlet properties in my View.designer.cs file were null when I attempted to access them when ViewDidLoad was called.
Turned out that my xib file in Visual Studio was no longer set to a Build Action of InterfaceDefinition.
Hopefully, this helps someone else who stumbles upon this issue.

Custom macro for NSLocalizedString [duplicate]

This question already has answers here:
Custom NSLocalizedString?
(7 answers)
Closed 9 years ago.
This question is regarding the localization from inside the app.
There are several blogs/tutorials that really helps and show the way to do it.
The ones which i referred to implement it are as below:
http://learning-ios.blogspot.in/2011/04/advance-localization-in-ios-apps.html
http://www.pastie.org/1976594
I am able to achieve it (with the help of such blogs.. thanks to them).
But i was trying one thing and i had a little doubt regarding the same as below
I am trying to create a same macro as the NSLocalizedString
[i.e. NSString *NSLocalizedString(String *key, String *value)]
but with a different macro name
something like
[NSString *getLocalizedString(String *key, String *value)] in my class and try to just replace NSLocalizedString method with my own macro using the same.
But a serious doubt/concern that i have is, is this technique/way approved by APPLE?
i mean.. can/will this violate the apple terms of non usage of Private API or kind of overriding the same??
Coz i have tried check the same in various blogs.. but was not able to find any specific answer to the same.
Can you please confirm if this can violate the T&C of APPLE or can i go ahead with the custom macro approach?
If possible can u also provide the link/blog/tutorial from which i can understand it better?
Thanks a lot in advance.
I don't see how this is using any kind of private APIs. -[NSBundle localizedStringForKey:] is a public API. You can write whatever macros or functions you want that call it. You can even #undef NSLocalizedString and replace it with your own definition if you want, it's just a C macro.
This won't violate Apple's terms. In fact, they recommend you do this to test your app and make sure you translated all the strings. They demonstrated how to do this in the 2012 WWDC video, session 244 Internationalization Tips and Tricks at the 23:50 mark.

UIUpgradeOtherBundleIdentifier ... No documentation found

I have been scratching my head around the plist identifier :
UIUpgradeOtherBundleIdentifier
... It might be exactly what I'm looking for to handle some bundle identifier problems i have... but before submitting and hoping it would work, I'd really like to know what it does exactly. But I can't find any documentation.
Anyone knows what this does ? Or even better, have used it, or have the documentation on it ?
Virtual pie and hugs are to be had :]
If you have access to the Apple Developer Forums, read this thread. In short, an Apple employee there says "it does not do what you expect" and "please don't use it".
And, of course, since it is not documented trying to use it would be grounds for rejection from the App Store anyway.

Three20 app store rejection (UITouch) - removed offending code, Release build but exists in binary

I know that there are a lot of posts in about Three20 app store rejections due to private UITouch variables and I've read them all but I still haven't been able to solve the problem:
The non-public APIs that are included in your application are the
following undocumented private UITouch instance variables:
UITouch._locationInWindow
UITouch._phase
UITouch._previousLocationInWindow
UITouch._tapCount
UITouch._timestamp
UITouch._touchFlags
UITouch._view
UITouch._window
Steps I've taken:
1. Removed offending code from Three20UI.xcodeproj
2. Release build
However, when I do a simple grep _phase libThree20UI.a (the resulting binary) I still get the result "libThree20UI.a matches". Any suggestions would be greatly appreciated.
There is a rather long thread about this over here. That seems to be from nearly 2 years ago. Has Three20 not been updated in the interim to remove the offending symbol use?
Make sure you build totally from clean; nuke your objects, if you need.
As far as I know, this rejection is caused by either uploading a Debug version of your app or by having a variable called DEBUG in your code. If you are using the latest version of three20 all the private calls have been removed for quite some time now