diff --git a/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.cc b/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.cc index 642c4de97..2bec8de2c 100644 --- a/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.cc +++ b/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.cc @@ -87,6 +87,9 @@ static int __unpack_test(const void* _packed, size_t _packed_len, uint32_t& _cmd return LONGLINK_UNPACK_OK; } +int LongLinkEncoder::packer_encoder_version = PackerEncoderVersion::kOld; +void LongLinkEncoder::SetEncoderVersion(int _version) {packer_encoder_version = _version;} + LongLinkEncoder::LongLinkEncoder() { longlink_pack = [](uint32_t _cmdid, uint32_t _seq, diff --git a/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.h b/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.h index ac610898b..e9c4d2e39 100644 --- a/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.h +++ b/samples/iOS/iOSDemo/PublicComponentV2/longlink_packer.h @@ -88,6 +88,8 @@ class LongLinkEncoder { */ std::function longlink_ispush; std::function longlink_identify_isresp; + static int packer_encoder_version; + static void SetEncoderVersion(int _version); }; extern LongLinkEncoder gDefaultLongLinkEncoder; diff --git a/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.h b/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.h index b3eb95774..26d1c4ceb 100644 --- a/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.h +++ b/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.h @@ -54,7 +54,7 @@ class StnCallBack : public Callback { //底层回包返回给上层解析 virtual int Buf2Resp(uint32_t _taskid, void* const _user_context, const std::string& _user_id, const AutoBuffer& _inbuffer, const AutoBuffer& _extend, int& _error_code, const int _channel_select); //任务执行结束 - virtual int OnTaskEnd(uint32_t _taskid, void* const _user_context, const std::string& _user_id, int _error_type, int _error_code); + virtual int OnTaskEnd(uint32_t _taskid, void* const _user_context, const std::string& _user_id, int _error_type, int _error_code, const CgiProfile& _profile); //上报网络连接状态 virtual void ReportConnectStatus(int _status, int longlink_status); diff --git a/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.mm b/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.mm index 8bbec2530..0f0b33796 100644 --- a/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.mm +++ b/samples/iOS/iOSDemo/PublicComponentV2/stn_callback.mm @@ -84,7 +84,7 @@ return handle_type; } -int StnCallBack::OnTaskEnd(uint32_t _taskid, void* const _user_context, const std::string& _user_id, int _error_type, int _error_code) { +int StnCallBack::OnTaskEnd(uint32_t _taskid, void* const _user_context, const std::string& _user_id, int _error_type, int _error_code, const CgiProfile& _profile) { return (int)[[NetworkService sharedInstance] OnTaskEndWithTaskID:_taskid userContext:_user_context errType:_error_type errCode:_error_code]; diff --git a/samples/iOS/iOSDemo/iOSDemo.xcodeproj/project.pbxproj b/samples/iOS/iOSDemo/iOSDemo.xcodeproj/project.pbxproj index bf16cddb8..4fdd199d1 100644 --- a/samples/iOS/iOSDemo/iOSDemo.xcodeproj/project.pbxproj +++ b/samples/iOS/iOSDemo/iOSDemo.xcodeproj/project.pbxproj @@ -582,6 +582,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -828,7 +829,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = iOSDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.tencent.mars; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -850,7 +851,7 @@ "$(PROJECT_DIR)", ); INFOPLIST_FILE = iOSDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.tencent.mars; PRODUCT_NAME = "$(TARGET_NAME)";