1004 code ios_ios ppnetwork code=-1004 - CSDN
精华内容
参与话题
  • iOS NSURLErrorDomain Code=-999

    万次阅读 2016-08-22 15:01:25
    iOS NSURLErrorDomain Code=-999 前言 今天有一个线上bug,是分配给提供H5的团队的,但是后台查不出来原因。于是让前端iOS帮忙查一查原因。 今天,交给我来帮忙查原因,但是问题在网络好的状态下并不必现,很...

    iOS  NSURLErrorDomain Code=-999

    前言

    今天有一个线上bug,是分配给提供H5的团队的,但是后台查不出来原因。于是让前端iOS帮忙查一查原因。

    今天,交给我来帮忙查原因,但是问题在网络好的状态下并不必现,很难去定位问题的根本原因。最后只能到测试旁边连接测试专用的慢网环境,然后才能必现。

    刚进入界面时是加载一个H5页面,当点击H5页面上的某个按钮的时候,会通过webview拦截到scheme,然后去走接口请求数据,得到数据后再加载H5页面。此时,走了webview加载失败的回调。

    加断点,打印出来的error信息是:

     
    Error Domain=NSURLErrorDomain Code=-999 “The operationcouldn’t becompleted.
     
    

    然后,笔者进入NSURLError.h中查看-999代表什么对应的key是什么:

     
    NS_ENUM(NSInteger)
    {
        NSURLErrorUnknown =            -1,
        NSURLErrorCancelled =          -999,
        NSURLErrorBadURL =              -1000,
        NSURLErrorTimedOut =            -1001,
        NSURLErrorUnsupportedURL =          -1002,
        NSURLErrorCannotFindHost =          -1003,
        NSURLErrorCannotConnectToHost =        -1004,
        NSURLErrorNetworkConnectionLost =      -1005,
        NSURLErrorDNSLookupFailed =        -1006,
        NSURLErrorHTTPTooManyRedirects =        -1007,
        NSURLErrorResourceUnavailable =        -1008,
        NSURLErrorNotConnectedToInternet =      -1009,
        NSURLErrorRedirectToNonExistentLocation =  -1010,
        NSURLErrorBadServerResponse =      -1011,
        NSURLErrorUserCancelledAuthentication =    -1012,
        NSURLErrorUserAuthenticationRequired =  -1013,
        NSURLErrorZeroByteResource =        -1014,
        NSURLErrorCannotDecodeRawData =            -1015,
        NSURLErrorCannotDecodeContentData =        -1016,
        NSURLErrorCannotParseResponse =            -1017,
        NSURLErrorAppTransportSecurityRequiresSecureConnection NS_ENUM_AVAILABLE(10_11, 9_0) = -1022,
        NSURLErrorFileDoesNotExist =        -1100,
        NSURLErrorFileIsDirectory =        -1101,
        NSURLErrorNoPermissionsToReadFile =    -1102,
        NSURLErrorDataLengthExceedsMaximum NS_ENUM_AVAILABLE(10_5, 2_0) =  -1103,
        
        // SSL errors
        NSURLErrorSecureConnectionFailed =      -1200,
        NSURLErrorServerCertificateHasBadDate =    -1201,
        NSURLErrorServerCertificateUntrusted =  -1202,
        NSURLErrorServerCertificateHasUnknownRoot = -1203,
        NSURLErrorServerCertificateNotYetValid =    -1204,
        NSURLErrorClientCertificateRejected =  -1205,
        NSURLErrorClientCertificateRequired =  -1206,
        NSURLErrorCannotLoadFromNetwork =      -2000,
        
        // Download and file I/O errors
        NSURLErrorCannotCreateFile =        -3000,
        NSURLErrorCannotOpenFile =          -3001,
        NSURLErrorCannotCloseFile =        -3002,
        NSURLErrorCannotWriteToFile =      -3003,
        NSURLErrorCannotRemoveFile =        -3004,
        NSURLErrorCannotMoveFile =          -3005,
        NSURLErrorDownloadDecodingFailedMidStream = -3006,
        NSURLErrorDownloadDecodingFailedToComplete =-3007,
     
        NSURLErrorInternationalRoamingOff NS_ENUM_AVAILABLE(10_7, 3_0) =        -1018,
        NSURLErrorCallIsActive NS_ENUM_AVAILABLE(10_7, 3_0) =                    -1019,
        NSURLErrorDataNotAllowed NS_ENUM_AVAILABLE(10_7, 3_0) =                  -1020,
        NSURLErrorRequestBodyStreamExhausted NS_ENUM_AVAILABLE(10_7, 3_0) =      -1021,
        
        NSURLErrorBackgroundSessionRequiresSharedContainer NS_ENUM_AVAILABLE(10_10, 8_0) = -995,
        NSURLErrorBackgroundSessionInUseByAnotherProcess NS_ENUM_AVAILABLE(10_10, 8_0) = -996,
        NSURLErrorBackgroundSessionWasDisconnected NS_ENUM_AVAILABLE(10_10, 8_0)= -997,
    };
     
    

    找到了吧!!!NSURLErrorCancelled就是-999,它代表请求被取消的意思。

    根本原因

    出现NSURLErrorDomain Code=-999的根本原因是什么呢?其实就是因为webview在之前的请求还没有加载完成,下一个请求发起了,此时webview会取消掉之前的请求,因此会回调到失败这里。

    因此,在处理Webview的加载失败的回调时,要注意拦截掉被取消的请求。

    解决方案

    在webview加载失败时,添加如下代码来判断:

     
    - (void)webView:(UIWebView *)webViewdidFailLoadWithError:(NSError *)error {
      [self stopAnimating];
      
      // 如果是被取消,什么也不干
      if([errorcode] == NSURLErrorCancelled)  {
        return;
      }
      
      // 后续失败处理
    }
     
    

    最后

    如果大家遇到同样的问题,请不要着急,这个bug不一定是后台的,也不一定是前端的,因此彼此应该要互相配合,共同找到问题的根本原因。

    由于安卓也有同样的问题,但是复现率没有iOS的高,在笔者找出根本原因后,H5人员与安卓端描述,希望安卓端也能统一改,但是描述不清楚,导致安卓这边有意见。于是叫笔者过来帮忙解释原因,讲了半天,安卓的leader说不可能~不会的~不应该~不影响~

    发现跟安卓沟通要是不懂一点安卓,真心容易被人忽悠。当然,最后还是要改的,事实都摆在面前了,还能有什么借口可以逃避!

    希望大家在遇到同样的问题时,淡定!沟通协作共同解决问题。

    展开全文
  • iOS中的NSError code(错误码)

    千次阅读 2014-04-28 11:54:46
    URL Loading System Error Codes ...These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”. typedef enum { NSURLErrorUnknown = -1, NSURLError

    URL Loading System Error Codes

    These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”.

    NSError codes in the Cocoa error domain.
    enum {
       NSFileNoSuchFileError = 4,
       NSFileLockingError = 255,
       NSFileReadUnknownError = 256,
       NSFileReadNoPermissionError = 257,
       NSFileReadInvalidFileNameError = 258,
       NSFileReadCorruptFileError = 259,
       NSFileReadNoSuchFileError = 260,
       NSFileReadInapplicableStringEncodingError = 261,
       NSFileReadUnsupportedSchemeError = 262,
       NSFileReadTooLargeError = 263,
       NSFileReadUnknownStringEncodingError = 264,
       NSFileWriteUnknownError = 512,
       NSFileWriteNoPermissionError = 513,
       NSFileWriteInvalidFileNameError = 514,
       NSFileWriteInapplicableStringEncodingError = 517,
       NSFileWriteUnsupportedSchemeError = 518,
       NSFileWriteOutOfSpaceError = 640,
       NSFileWriteVolumeReadOnlyError = 642m
       NSKeyValueValidationError = 1024,
       NSFormattingError = 2048,
       NSUserCancelledError = 3072,
       
       NSFileErrorMinimum = 0,
       NSFileErrorMaximum = 1023,
       NSValidationErrorMinimum = 1024,
       NSValidationErrorMaximum = 2047,
       NSFormattingErrorMinimum = 2048,
       NSFormattingErrorMaximum = 2559,
       
       NSPropertyListReadCorruptError = 3840,
       NSPropertyListReadUnknownVersionError = 3841,
       NSPropertyListReadStreamError = 3842,
       NSPropertyListWriteStreamError = 3851,
       NSPropertyListErrorMinimum = 3840,
       NSPropertyListErrorMaximum = 4095
       
       NSExecutableErrorMinimum = 3584,
       NSExecutableNotLoadableError = 3584,
       NSExecutableArchitectureMismatchError = 3585,
       NSExecutableRuntimeMismatchError = 3586,
       NSExecutableLoadError = 3587,
       NSExecutableLinkError = 3588,
       NSExecutableErrorMaximum = 3839,
       
    }

    Loading System Error Codes

    These values are returned as the error code property of an NSError object with the domain “NSURLErrorDomain”.

    enum

    {

       NSURLErrorUnknown = -1,

       NSURLErrorCancelled = -999,

       NSURLErrorBadURL = -1000,

       NSURLErrorTimedOut = -1001,

       NSURLErrorUnsupportedURL = -1002,

       NSURLErrorCannotFindHost = -1003,

       NSURLErrorCannotConnectToHost = -1004,

       NSURLErrorDataLengthExceedsMaximum = -1103,

       NSURLErrorNetworkConnectionLost = -1005,

       NSURLErrorDNSLookupFailed = -1006,

       NSURLErrorHTTPTooManyRedirects = -1007,

       NSURLErrorResourceUnavailable = -1008,

       NSURLErrorNotConnectedToInternet = -1009,

       NSURLErrorRedirectToNonExistentLocation = -1010,

       NSURLErrorBadServerResponse = -1011,

       NSURLErrorUserCancelledAuthentication = -1012,

       NSURLErrorUserAuthenticationRequired = -1013,

       NSURLErrorZeroByteResource = -1014,

       NSURLErrorCannotDecodeRawData = -1015,

       NSURLErrorCannotDecodeContentData = -1016,

       NSURLErrorCannotParseResponse = -1017,

       NSURLErrorInternationalRoamingOff = -1018,

       NSURLErrorCallIsActive = -1019,

       NSURLErrorDataNotAllowed = -1020,

       NSURLErrorRequestBodyStreamExhausted = -1021,

       NSURLErrorFileDoesNotExist = -1100,

       NSURLErrorFileIsDirectory = -1101,

       NSURLErrorNoPermissionsToReadFile = -1102,

       NSURLErrorSecureConnectionFailed = -1200,

       NSURLErrorServerCertificateHasBadDate = -1201,

       NSURLErrorServerCertificateUntrusted = -1202,

       NSURLErrorServerCertificateHasUnknownRoot = -1203,

       NSURLErrorServerCertificateNotYetValid = -1204,

       NSURLErrorClientCertificateRejected = -1205,

       NSURLErrorClientCertificateRequired = -1206,

       NSURLErrorCannotLoadFromNetwork = -2000,

       NSURLErrorCannotCreateFile = -3000,

       NSURLErrorCannotOpenFile = -3001,

       NSURLErrorCannotCloseFile = -3002,

       NSURLErrorCannotWriteToFile = -3003,

       NSURLErrorCannotRemoveFile = -3004,

       NSURLErrorCannotMoveFile = -3005,

       NSURLErrorDownloadDecodingFailedMidStream = -3006,

       NSURLErrorDownloadDecodingFailedToComplete = -3007

    }

    Constants

       NSURLErrorUnknown = -1,

    NSURLErrorUnknown

    Returned when the URL Loading system encounters an error that it cannot interpret.

    This can occur when an error originates from a lower level framework or library. Whenever this error code is received, it is a bug, and should be reported to Apple.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

       NSURLErrorCancelled = -999,

    Returned when an asynchronous load is canceled.

    A Web Kit framework delegate will receive this error when it performs a cancel operation on a loading resource. Note that an NSURLConnection or NSURLDownloaddelegate will not receive this error if the download is canceled.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorBadURL = -1000,

    Returned when a URL is sufficiently malformed that a URL request cannot be initiated

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorTimedOut = -1001,

    Returned when an asynchronous operation times out.

    NSURLConnection will send this error to its delegate when the timeoutInterval in NSURLRequest expires before a load can complete.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorUnsupportedURL = -1002,

    Returned when a properly formed URL cannot be handled by the framework.

    The most likely cause is that there is no available protocol handler for the URL.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorCannotFindHost = -1003,

    Returned when the host name for a URL cannot be resolved.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorCannotConnectToHost = -1004,

    Returned when an attempt to connect to a host has failed.

    This can occur when a host name resolves, but the host is down or may not be accepting connections on a certain port.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorDataLengthExceedsMaximum = -1103,

    Returned when the length of the resource data exceeds the maximum allowed.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorNetworkConnectionLost = -1005,

    Returned when a client or server connection is severed in the middle of an in-progress load.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorDNSLookupFailed = -1006,

    See NSURLErrorCannotFindHost

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorHTTPTooManyRedirects = -1007,

    Returned when a redirect loop is detected or when the threshold for number of allowable redirects has been exceeded (currently 16).

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorResourceUnavailable = -1008,

    Returned when a requested resource cannot be retrieved.

    Examples are “file not found”, and data decoding problems that prevent data from being processed correctly.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorNotConnectedToInternet = -1009,

    Returned when a network resource was requested, but an internet connection is not established and cannot be established automatically, either through a lack of connectivity, or by the user's choice not to make a network connection automatically.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


       NSURLErrorRedirectToNonExistentLocation = -1010,

    Returned when a redirect is specified by way of server response code, but the server does not accompany this code with a redirect URL.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.


    NSURLErrorBadServerResponse

    Returned when the URL Loading system receives bad data from the server.

    This is equivalent to the “500 Server Error” message sent by HTTP servers.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorUserCancelledAuthentication

    Returned when an asynchronous request for authentication is cancelled by the user.

    This is typically incurred by clicking a “Cancel” button in a username/password dialog, rather than the user making an attempt to authenticate.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorUserAuthenticationRequired

    Returned when authentication is required to access a resource.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorZeroByteResource

    Returned when a server reports that a URL has a non-zero content length, but terminates the network connection “gracefully” without sending any data.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotDecodeRawData

    Returned when content data received during an NSURLConnection request cannot be decoded for a known content encoding.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotDecodeContentData

    Returned when content data received during an NSURLConnection request has an unknown content encoding.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotParseResponse

    Returned when a response to an NSURLConnection request cannot be parsed.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorInternationalRoamingOff

    Returned when a connection would require activating a data context while roaming, but international roaming is disabled.

    Available in iOS 3.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCallIsActive

    Returned when a connection is attempted while a phone call is active on a network that does not support simultaneous phone and data communication (EDGE or GPRS).

    Available in iOS 3.0 and later.

    Declared in NSURLError.h.

    NSURLErrorDataNotAllowed

    Returned when the cellular network disallows a connection.

    Available in iOS 3.0 and later.

    Declared in NSURLError.h.

    NSURLErrorRequestBodyStreamExhausted

    Returned when a body stream is needed but the client does not provide one. This impacts clients on iOS that send a POST request using a body stream but do not implement the NSURLConnection delegate method connection:needNewBodyStream.

    Available in iOS 3.0 and later.

    Declared in NSURLError.h.

    NSURLErrorFileDoesNotExist

    Returned when a file does not exist.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorFileIsDirectory

    Returned when a request for an FTP file results in the server responding that the file is not a plain file, but a directory.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorNoPermissionsToReadFile

    Returned when a resource cannot be read due to insufficient permissions.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorSecureConnectionFailed

    Returned when an attempt to establish a secure connection fails for reasons which cannot be expressed more specifically.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorServerCertificateHasBadDate

    Returned when a server certificate has a date which indicates it has expired, or is not yet valid.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorServerCertificateUntrusted

    Returned when a server certificate is signed by a root server which is not trusted.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorServerCertificateHasUnknownRoot

    Returned when a server certificate is not signed by any root server.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorServerCertificateNotYetValid

    Returned when a server certificate is not yet valid.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorClientCertificateRejected

    Returned when a server certificate is rejected.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorClientCertificateRequired

    Returned when a client certificate is required to authenticate an SSL connection during an NSURLConnection request.

    Available in iOS 4.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotLoadFromNetwork

    Returned when a specific request to load an item only from the cache cannot be satisfied.

    This error is sent at the point when the library would go to the network accept for the fact that is has been blocked from doing so by the “load only from cache” directive.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotCreateFile

    Returned when NSURLDownload object was unable to create the downloaded file on disk due to a I/O failure.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotOpenFile

    Returned when NSURLDownload was unable to open the downloaded file on disk.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotCloseFile

    Returned when NSURLDownload was unable to close the downloaded file on disk.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotWriteToFile

    Returned when NSURLDownload was unable to write to the downloaded file on disk.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotRemoveFile

    Returned when NSURLDownload was unable to remove a downloaded file from disk.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorCannotMoveFile

    Returned when NSURLDownload was unable to move a downloaded file on disk.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorDownloadDecodingFailedMidStream

    Returned when NSURLDownload failed to decode an encoded file during the download.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    NSURLErrorDownloadDecodingFailedToComplete

    Returned when NSURLDownload failed to decode an encoded file after downloading.

    Available in iOS 2.0 and later.

    Declared in NSURLError.h.

    Availability

    • Available in OS X v10.2 with Safari 1.0 installed.
    • Available in OS X v10.2.7 and later.

    Declared In

    NSURLError.h


    
    
    
    
    
    
    展开全文
  • Error Domain=NSURLErrorDomain Code=-1004 "未能连接到服务器。" UserInfo={NSUnderlyingError=0x1c10446e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _...

    Error Domain=NSURLErrorDomain Code=-1004 "未能连接到服务器。" UserInfo={NSUnderlyingError=0x1c10446e0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, NSErrorFailingURLStringKey=http://www.cheshizh.com/?m=app&c=app_mall&a=app_focus&city=%E9%95%BF%E6%98%A51, NSErrorFailingURLKey=http://www.cheshizh.com/?m=app&c=app_mall&a=app_focus&city=%E9%95%BF%E6%98%A51, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=未能连接到服务器。}

     

    打开其他应用也是出现"未能连接到服务器"字样:  设置->无线局域网->点击正在使用的网络->最下面"HTTP代理"->"配置代理"改为"自动"就OK了

    转载于:https://www.cnblogs.com/lsh1234/p/7909665.html

    展开全文
  • 网上排查了很久才发现iOS9版本中AFNetworking发送参数时会为nil,导致1004错误的发生。 解决方案1: AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; manager.requestSerializer....

    网上排查了很久才发现iOS9版本中AFNetworking发送参数时会为nil,导致1004错误的发生。

    解决方案1:

    AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
    
    manager.requestSerializer.HTTPMethodsEncodingParametersInURI = [NSSet setWithArray:@[@"POST", @"GET", @"HEAD"]];
    复制代码

    //最重要的一句话如上

    NSURL *URL = ......;
    
    [manager POST:URL parameters:params progress:nil success:nil failure:nil];
    复制代码

    如果上述不起效那么可以试试 解决方案2: 由于不支持HTTP2.0的问题 找后台将其改为HTTP1.1后即可

    展开全文
  •  怎样在Xcode7上面去禁止iOS 9 的 App 传输安全 ,以及修复“Could not connect to sever”错误 苹果在iOS 9 上面做出了一个激进的决定,禁止 所有iOS App上不安全的HTTP 传输。 作为 App传输安全的...
  • 真机iPad mini2,iOS9.1,已经在info.plist中增加 ``` <key>NSAppTransportSecurity <key>NSAllowsArbitraryLoads ``` ![显示为这样](https://img-ask.csdn.net/upload/201601/21/1453314365_475992.png) ...
  • iOS官方Sample大全

    万次阅读 2011-11-23 19:55:10
    http://developer.apple.com/library/ios/samplecode/Birthdays/Birthdays.zip  http://developer.apple.com/library/ios/samplecode/ClockControlPalette/ClockControlPalette.zip  ...
  • 升级了Xcode,真机测试会遇到code signing is required for product type 'xxxxx' in SDK 'iOS 10.0' ,具体如下 解决方法稍微做一下设置,clean后运行
  • wifi情况下,在iOS 10上大概率的出现code = -1005,但在iOS 9,iOS 8,iOS 7上都没有问题。而且移动网络下也没有这个问题。通过谷歌,在苹果论坛中找到了相同情况的帖子。当时还以为是苹果的bug。但通过测试许多大厂...
  • iOS code signing identity 配置

    千次阅读 2019-04-20 21:40:17
    PROJECT 和 TARGET 中都要选:code signing identity: 调试统一都选 developer, 发布统一都选 distribution provisioning Profile 也要选. 过期和无效的证书及时删除, 避免 ambiguous 警告. 选择正确的...
  • 在真机测试的时候往往会突然出现这样一个错误,code signing is required for product type 'Application' in SDK 'iOS 7.0' ,就是说代码签名证书不对劲。 解决方案, 1.选择工程->Build Settings -> ...
  • 大家在做真机调试的时候,或许会遇到这样的问题,那如何去解决? 网上有大把的教程,所以具体的我就不说了,说关键点。 当这种情况出现了: 1.看看自己工程里面的xxx-Info.plist文件里面的Bundle identifier是否...
  • iOS 开发 Certificate和Code Signing–证书与签名–详解1.Certificate-证书iOS 开发 证书–根证书/申请证书/开发(发布)证书–详解2.Code Signing-签名 iOS 开发 code sign 代码签名深入剖析每个证书(其实是公钥)...
  • iOS开发者必备:五大编程类工具

    万次阅读 2018-03-28 16:51:24
    iOS10正式版的发布,无疑又掀起一场开发热潮。iOS开发工具多如牛毛,开发者在编写大段代码时,难免会出现结构或语法错误。所以选择一款功能强劲且实用的编程工具对开发者来说可谓是大有裨益。小编收录和整理了对...
  • 获取ios设备设置的国家和语言

    千次阅读 2012-05-31 14:08:40
    CCLOG("country code:%s;language code=%s", [RootViewController getCountryCode].UTF8String,[RootViewController getLanguageCode].UTF8String); //US en */ + (NSString *)getCountryCode { retu
  • 今天在运行程序到IOS simulator的时候,报了一个错:  An Error war encountered while running(Domain = FBSOpenApplicationErrorDomain, Code = 4),上网查资料后找到了解决方案,重置一下模拟器就OK了,如下图:...
  • JS 和 iOS 交互,加载 webView 时抛出异常, NSURLConnection finished with error - code -1100, 异常原因是由于没有找到文件。 我遇到的原因: 原因1:没有将要加载的文件(如图片等)添加到项目中 原因2:JS ...
  • 问题 Xcode运行代码,error了,如下 command codesign failed with a nonzero exit code 解决 1. clean一下,command+shift+k 2. 重启电脑,重新运行
  • 记录一个有意思的网络请求的错误信息,在使用NSURLSession发送...Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo={NSLocalizedDescription=unsupported URL, NSUnderlyingError=0x7fa9b1d06120 {
  • 最近开始做公司的ios项目,由于是c
1 2 3 4 5 ... 20
收藏数 137,121
精华内容 54,848
关键字:

1004 code ios