업데이트 할 앱이 반년 된 &입니다. 그것은 statemachine로 작성되었습니다. 이제 몇 가지를 추가했지만 connectionRequest가 iOS (iOS 디버그 용으로 빌드 된)에서 작동하지 않는 것 같습니다. 나는 그것을 안드로이드에서 만들었고 아주 잘 작동합니다. 때문에 비 보안 URL http
에서 데이터를 가져 오는에서 응용 프로그램을 방지 새로운 애플 규정에iOS에서 ConnectionRequest가 작동하지 않습니다.
public void connectionForLogin(String username, String password) {
ConnectionRequest cr = new ConnectionRequest() {
@Override
protected void readResponse(InputStream input) throws IOException {
JSONParser jSONParser = new JSONParser();
Map<String, Object> parsedData = jSONParser.parseJSON(new InputStreamReader(input));
ArrayList<Map<String, Object>> response = (ArrayList<Map<String, Object>>) parsedData.get("root");
if (response != null) {
for (Map<String, Object> element : response) {
success = (String) element.get("login");
msg = (String) element.get("msg");
ArrayList<Map<String, Object>> userInfoArray = (ArrayList) element.get("user_info");
Storage.getInstance().writeObject("userInfo", userInfoArray);
}
}
}
@Override
protected void postResponse() {
super.postResponse();
}
@Override
protected void handleErrorResponseCode(int code, String message) {
}
@Override
protected void handleException(Exception err) {
}
@Override
protected void handleIOException(IOException err) {
}
@Override
protected void handleRuntimeException(RuntimeException err) {
}
};
cr.setPost(true);
cr.setDuplicateSupported(true);
cr.setTimeout(30000);
AllUrl au = new AllUrl();
InfiniteProgress ip = new InfiniteProgress();
Dialog d = ip.showInifiniteBlocking();
cr.setDisposeOnCompletion(d);
cr.setUrl(http://zzz.com/api/logins/match? + "username=" + username + "&password=" + password);
NetworkManager.getInstance().addToQueueAndWait(cr);
}
URL로 인한 것입니까? API는 http & iOS에 https가 필요하다고 생각합니다. 그러나 그렇다면 이전 버전이 정상적으로 작동하는 이유는 무엇입니까? – beck