博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
iOS 真机调试不能连接网络的排错过程
阅读量:5020 次
发布时间:2019-06-12

本文共 2739 字,大约阅读时间需要 9 分钟。

开发环境:

macOS 10.12.1
Xcode 8.1
Qt 5.8
gSOAP 2.8
iPhone 6S+iOS 10.1.1
 
问题:
使用 Qt Quick 写了一个跨平台的应用,在Win10、Android、macOS下都已经正常运行,但是连接到 iOS 真机调试的时候,gSOAP 调用 Webservice 总是返回错误代码28,我
根据百度出来的下面的 gSOAP 错误代码表
一直在寻找有关 SOAP_DIME_END 的错误。
 

返回值错误代码表(ERROR CODE

SOAP_EOF

-1

Unexpected end of file, no input, or timeout while receiving data

SOAP_ERR

-1

 

SOAP_OK

0

No error

SOAP_CLI_FAULT

1

The service returned a client fault (SOAP 1.2 Sender fault)

SOAP_SVR_FAULT

2

The service returned a server fault (SOAP 1.2 Receiver fault)

SOAP_TAG_MISMATCH

3

An XML element didn't correspond to anything expected

SOAP_TYPE

4

An XML Schema type mismatch

SOAP_SYNTAX_ERROR

5

An XML syntax error occurred on the input

SOAP_NO_TAG

6

Begin of an element expected, but not found

SOAP_IOB

7

Array index out of bounds

SOAP_MUSTUNDERSTAND

8

An element needs to be ignored that need to be understood

SOAP_NAMESPACE

9

Namespace name mismatch (validation error)

SOAP_USER_ERROR

10

 

SOAP_FATAL_ERROR

11

Internal error

SOAP_FAULT

12

An exception raised by the service

SOAP_NO_METHOD

13

The dispatcher did not find a matching operation for the request

SOAP_GET_METHOD

14

HTTP GET operation not handled

SOAP_EOM

15

Out of memory

SOAP_NULL

16

An element was null, while it is not supposed to be null

SOAP_DUPLICATE_ID

17

Multiple occurrences of the same element ID on the input

SOAP_MISSING_ID

18

Element ID missing for an HREF on the input

SOAP_HREF

19

Reference to object is incompatible with the object refered to

SOAP_UDP_ERROR

20

Message too large to store in UDP packet

SOAP_TCP_ERROR

21

A connection error occured

SOAP_HTTP_ERROR

22

An HTTP error occured

SOAP_SSL_ERROR

23

An SSL error occured

SOAP_ZLIB_ERROR

24

A Zlib error occured

SOAP_DIME_ERROR

25

DIME parsing error

SOAP_DIME_HREF

26

DIME attachment has no href from SOAP body

SOAP_DIME_MISMATCH

27

DIME version/transmission error

SOAP_DIME_END

28

End of DIME error

SOAP_MIME_ERROR

29

MIME parsing error

SOAP_MIME_HREF

30

 

SOAP_MIME_END

31

 

SOAP_VERSIONMISMATCH

32

SOAP version mismatch or no SOAP message

SOAP_PLUGIN_ERROR

33

Failed to register plugin

SOAP_DATAENCODINGUNKNOWN

34

SOAP 1.2 DataEncodingUnknown fault

SOAP_REQUIRED

35

Attributed required validation error

SOAP_PROHIBITED

36

Attributed prohibited validation error

SOAP_OCCURS

37

Element minOccurs/maxOccurs validation error

SOAP_LENGTH

38

Element length validation error

SOAP_FD_EXCEEDED

39

 

 
实在解决不了了,于是下载了 iOS 10.0 Simulator ,在 iOS 虚拟机上跑了一下,没有问题,说明可能是真机系统权限的问题。
因为我用的手机卡放在我的 Mate8 上,iPhone 开发机上没有卡,是连接的 WIFI,突然想到,是不是应该把卡插到 iPhone 开发机上试一下。
插上卡之后,手机立马提示是否允许使用网络,同意之后,就可以联网了。然后在【使用无线局域网与蜂窝移动的应用】中可以看到我的应用了。
其实前面说了一大堆都是废话,只不过是记录了一下我昨天呕心沥血大半天的填坑过程。总而言之,你如果真机调试 iOS 应用,最好插着你的 SIM 卡。
 
今天上午看到一篇相关的帖子,截图如下:
 

转载于:https://www.cnblogs.com/sdsunjing/p/6068984.html

你可能感兴趣的文章
linux缺页异常处理--内核空间
查看>>
[NOIP模拟测试3] 建造游乐园 题解(欧拉图性质)
查看>>
win7下ASP.NET网站发布流程,IIS配置
查看>>
Xhtml + CSS
查看>>
Mysql面试题
查看>>
GEOS/GDAL 交叉编译ARM64-linux版本
查看>>
Expression Blend实例中文教程(1) - 开篇
查看>>
Redis哨兵模式
查看>>
mongoengine
查看>>
正则表达式-包含A字符串且不包含B字符串
查看>>
MATLAB入门学习(整合)
查看>>
page=new page($total,$listrows,$query,$ord)之$query
查看>>
Android读取url图片保存及文件读取
查看>>
完整ASP.Net Excel导入
查看>>
判断CPU大小端示例代码
查看>>
ARTS打卡第13周
查看>>
循环队列的运用---求K阶斐波那契序列
查看>>
pta 编程题14 Huffman Codes
查看>>
初始化bootstrap treeview树节点
查看>>
python selenium向<sapn>标签中写入内容
查看>>