2015-09-04 2 views
3

Немного предыстории:Вызов подсказки доступа и показать его пользователю

Я разработал игру в Libgdx и загрузить его на ITunes App Store. Мое приложение получило отвергается с следующей причиной: (Это не вопрос, но я хотел бы дать вам немного фона, что я пытаюсь добиться)

> 17.1 Details 

Additionally, we noticed that your app does not obtain user consent before collecting the user's personal data. 

Specifically, users scores are posted to a high score feature. Please see the attached screenshot(s) for additional information. 

Next Steps 

To collect personal data with your app, you must make it clear to the user that their personal data will be uploaded to your server and you must obtain the user's consent before the data is uploaded. 

- Starting with iOS 6, there are keys for specifying the reason the app will access the user's protected data. When the access prompt is displayed, the purpose specified in these keys is displayed in that dialog box. If your application will be transmitting protected user data, the usage string in your access request should clearly inform the user that their data will be uploaded to your server if they consent. 

Моего приложение только загрузить высокий балл на мой сервер. Но хорошо, если Apple заявит, что пользователь должен знать об этом, я разъясню.

Реальная миссия:

Я ничего не знаю о программировании Objective-C, так как я сделал это приложение в Java. Но я знаю, что у iOS есть некоторые диалоговые окна безопасности, которые подсказывают пользователю, могут ли они использовать следующую функцию или данные в приложении.

Я хотел бы ссылаться на этот вид диалога (с моим собственным сообщением)

enter image description here

Я также знаю, что он должен быть определен в моем файле info.plist, но я не знаю, как получить доступ это во время выполнения и показать это в моей игре.

Есть ли у кого-нибудь ключ, как это открыть?

ответ

0

Вы могли бы попробовать мое расширение libgdx для диалоговых окон: https://github.com/TomGrill/gdx-dialogs

или:

Вы должны взаимодействовать с кодом платформы specifig: https://github.com/libgdx/libgdx/wiki/Interfacing-with-platform-specific-code

Использование UIAlertView класса в вашей реализации интерфейса IOS, чтобы открыть AlertView:

Код пример:

UIAlertViewDelegateAdapter delegate = new UIAlertViewDelegateAdapter() { 

    @Override 
    public void didDismiss(UIAlertView alertView, long buttonIndex) { 
     //handle button click based on buttonIndex 
    } 

    @Override 
    public void clicked(UIAlertView alertView, long buttonIndex) { 

    } 

    @Override 
    public void cancel(UIAlertView alertView) { 

    } 

    @Override 
    public void willPresent(UIAlertView alertView) { 

    } 

    @Override 
    public void didPresent(UIAlertView alertView) { 

    } 

    @Override 
    public void willDismiss(UIAlertView alertView, long buttonIndex) { 

    } 

    @Override 
    public boolean shouldEnableFirstOtherButton(UIAlertView alertView) { 
     return false; 
    } 

}; 

String[] otherButtons = new String[1]; 
otherButtons[0] = "No"; 
String firstButton = "Yes"; 


UIAlertView alertView = new UIAlertView("Title", "message", delegate, firstButton, otherButtons); 

alertView.show(); 
Смежные вопросы