This topic describes common issues and their solutions for developing an iOS app.
Q: Why can't I get a new token after a user logs out and then logs on again?
A: Make sure to call the logout API when the user logs out.
#import <IMSAccount/IMSAccountService.h>
[[IMSAccountService sharedService] logout];Q: Why does my app return the following error when I call the built-in account logon feature?
15:48:04.904551+0800 pelfinpet[40548:1992573] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
A: The xib file is in the wrong location. Move the xib file from the ALBBOpenAccountUI.framework to the main project directory.
Q: Why does my iOS app print the following error in the log after it starts?
The error message is similar to "IMSPackage - AKOPModuleUpdater.m:204 | Decompression error".
2019-01-28 16:33:15.165915+0800 com.hnzhzn.zhzj[4107:1483985] IMSPackage - AKOPModuleUpdater.m:166 | Unzipping Zip package: E7142E1B4BEF6E7D58126924D787701F-release-a123N7GcC7vD4dFH-boneMobile-1.0.4-fdde7a3d0576b493b04b0d5ec83d79c3-source2019-01-28 16:33:15.209104+0800 com.hnzhzn.zhzj[4107:1483985] 1 entries in the zip file2019-01-28 16:33:15.210651+0800 com.hnzhzn.zhzj[4107:1483985] IMSPackage - AKOPModuleUpdater.m:204 | Decompression error: zip: /Users/zhanhe/Library/Developer/CoreSimulator/Devices/D0137B06-83AB-4EDA-818D-22E8FABF6520/data/Containers/Data/Application/D09F0B02-1891-4C5F-A76A-4E990CE41040/Library/Application Support/com.hnzhzn.zhzj/OfflinePackage/download/E7142E1B4BEF6E7D58126924D787701F-release-a123N7GcC7vD4dFH-boneMobile-1.0.4-fdde7a3d0576b493b04b0d5ec83d79c3-source.zip, dstPath: /Users/zhanhe/Library/Developer/CoreSimulator/Devices/D0137B06-83AB-4EDA-818D-22E8FABF6520/data/Containers/Data/Application/D09F0B02-1891-4C5F-A76A-4E990CE41040/Library/Application Support/com.hnzhzn.zhzj/OfflinePackage/modules/E7142E1B4BEF6E7D58126924D787701F-release-a123N7GcC7vD4dFH-boneMobile-1.0.4-fdde7a3d0576b493b04b0d5ec83d79c3-source/2.2.4, error: Error Domain=ZipArchiveBlocksErrorDomain Code=1 "Failed to open output file for writing" UserInfo={NSLocalizedDescription=Failed to open output file for writing}2019-01-28 16:33:15.210941+0800 com.hnzhzn.zhzj[4107:1483985] IMSPackage - AKOPackageUpdater.m:390 | module: E7142E1B4BEF6E7D58126924D787701F-release-a123N7GcC7vD4dFH-boneMobile-1.0.4-fdde7a3d0576b493b04b0d5ec83d79c3-source, error: Error Domain=ZipArchiveBlocksErrorDomain Code=1 "Failed to open output file for writing" UserInfo={NSLocalizedDescription=Failed to open output file for writing}2019-01-28 16:33:15.211685+0800 com.hnzhzn.zhzj[4107:1482908] IMSPackage - AKOPackageUpdater.m:407 | End update task chain: {"E7142E1B4BEF6E7D58126924D787701F-release-a123N7GcC7vD4dFH-boneMobile-1.0.4-fdde7a3d0576b493b04b0d5ec83d79c3-source" = "<AKOModuleConfig: 0x60000102d840>";}, error: Error Domain=ZipArchiveBlocksErrorDomain Code=1 "Failed to open output file for writing" UserInfo={NSLocalizedDescription=Failed to open output file for writing}20
A: A locally used library, such as - SSZipArchive (= 2.1.2), conflicts with the provided ZipArchive library. To resolve this issue, delete - SSZipArchive (= 2.1.2).
Q: Why does a 403 error occur when a user logs on with a third-party account? The log is similar to the following.
<NSHTTPURLResponse: 0x600001b7a560> { URL: https://sdk.openaccount.aliyun.com/api/test/loginbyoauth.json } { Status Code: 403, Headers {
"Access-Control-Allow-Origin" = (
"*"
);
"Content-Length" = (
0
);
"Content-Type" = (
"text/plain;charset=UTF-8"
);
Date = (
"Mon, 24 Jun 2019 02:42:56 GMT"
);
Server = (
nginx
);
"access-control-allow-headers" = (
"X-Requested-With,X-Sequence,X-Ca-Key,X-Ca-Secret,X-Ca-Version,X-Ca-Timestamp,X-Ca-Nonce,X-Ca-API-Key,X-Ca-Stage,X-Ca-Client-DeviceId,X-Ca-Client-AppId,X-Ca-Signature,X-Ca-Signature-Headers,X-Ca-Signature-Method,X-Forwarded-For,X-Ca-Date,X-Ca-Request-Mode,Authorization,Content-Type,Accept,Accept-Ranges,Cache-Control,Range,Content-MD5"
);
"access-control-allow-methods" = (
"GET,POST,PUT,DELETE,HEAD,OPTIONS,PATCH"
);
"access-control-max-age" = (
172800
);
"x-ca-error-message" = (
Unauthorized
);
"x-ca-request-id" = (
"2C90C481-0AEE-407B-A970-EC2259C20C5A"
);
} }
=============================
2019-06-24 10:42:56.695167+0800 zoozee-ios[4126:434355] [Warn]
Error code : 554
Error type : ALBBOpenAccount - RPC_REQUEST_ERROR
Error message : Reason: Error Domain=com.alibaba.openaccount Code=552 "The system is busy. Please try again later." UserInfo={NSLocalizedDescription=The system is busy. Please try again later.}
Suggestion : Please try again later.
A: Configure the following parameters based on the API level of the software development kit (SDK).
- For SDKs of API level 8 and later:
#import <IMSIotSmart/IMSIotSmart.h> IMSIotSmartConfig *config = [IMSIotSmartConfig new]; config.regionType = REGION_CHINA_ONLY; // For Alibaba Cloud China Website (www.aliyun.com). For Alibaba Cloud International Website (www.alibabacloud.com), use: config.regionType = REGION_ALL; config.appType = APP_TYPE_PRODUCTION; // For the value range, see the IMSAppType enumeration. [IMSIotSmart sharedInstance].config = config; - For SDKs of API level 7 and earlier:
[IMSConfiguration initWithHost:@"api.link.aliyun.com" serverEnv:IMSServerRelease]; // API channel SDK initialization [accountSDK setTaeSDKEnvironment:TaeSDKEnvironmentRelease]; // Account SDK initialization
Q: The project crashes and reports the following error
*** Terminating app due to uncaught exception 'com.openaccount.SecurityGuard.SECURITY_PICTURE_NOT_FOUND', reason: '(null)'
A: Check if the bundleID of the project matches the bundle ID (package name) that you entered when you created the app on the platform.
Q: How do I remove the word "Debug" from my iOS app page?

- Comment out the reference to IMSDebug in the Podfile.
pod 'IMSDebug', :path => 'LocalPods/IMSDebug.podspec' - Search for
@"Debug"in the project code and comment out the related code.