Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

cordova-plugin-code-push dependency overrides AFNetworking files #679

@odedle-tr

Description

@odedle-tr

Description

Hi, we have an ios cordova app and we use a third party plugin that uses the AFNetowrking framework.
We have the updated version of the AFNetwoking framework installed via pods.

We also have your plugin installed wich uses the depnedancy corodva-plugin-advanced-http.

The issue here is when installing your plugin, the dependency corodva-plugin-advanced-http overide the AFNetworking files,
resulting in an older version of this framework.

We get the error in xcode resulting in an app crash:

(lldb) *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AFHTTPSessionManager GET:parameters:headers:progress:success:failure:]: unrecognized selector sent to instance 0x2817ed950'
terminating with uncaught exception of type NSException
(lldb)

This happens because our third party plugin expect this inteface:

  • (NSURLSessionDataTask *)GET:(NSString *)URLString
    parameters:(nullable id)parameters
    headers:(nullable NSDictionary <NSString *, NSString *> *)headers
    progress:(nullable void (^)(NSProgress * _Nonnull))downloadProgress
    success:(nullable void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success
    failure:(nullable void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure

But the corodva-plugin-advanced-http overrides it with probably an older version (see: 'headers' and 'progress' are missing in this api):

  • (NSURLSessionDataTask *)GET:(NSString *)URLString
    parameters:(id)parameters
    success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
    failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure

Please let know how we can overcome this issue or apply the correct fix
Thanks.

Additional Information

  • cordova-plugin-code-push version: 1.12.0
  • Cordova version: 9.0.0
  • Cordova-ios versio: 6.2.0
  • iOS/Android/Windows version: - 14.4
  • Does this reproduce on a debug build or release build? - both.
  • Does this reproduce on a simulator, or only on a physical device? - both

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions