Removing UIWebView references from Cordova SDK 3.8.0

The Apache Cordova SDK contains a vestigial reference to UIWebView. All references in the underlying native iOS SDK have been converted to WKWebView and were inadvertently omitted in the Cordova SDK.

The remnant reference to UIWebView is an issue because Apple has announced publishing apps that refer to UIWebView classes will be prohibited after December 2020.

In order to work around this, edit the file MCEWebViewActionDelegate.h in Cordova-3.8.0/plugins/co.acoustic.mobile.push.sdk/src/ios/AcousticMobilePush.framework/Headers and remove the references to UIWebView. You will be left with:

/*
 * Copyright © 2014, 2019 Acoustic, L.P. All rights reserved.
 *
 * NOTICE: This file contains material that is confidential and proprietary to
 * Acoustic, L.P. and/or other developers. No license is granted under any intellectual or
 * industrial property rights of Acoustic, L.P. except as may be provided in an agreement with
 * Acoustic, L.P. Any unauthorized copying or distribution of content from this file is
 * prohibited.
 */

@class MCEInboxMessage;
@interface MCEWebViewActionDelegate : NSObject
  
/** This method returns the singleton object of this class. */
@property(class, nonatomic, readonly) MCEWebViewActionDelegate * sharedInstance NS_SWIFT_NAME(shared);

/** The actions that should be responded to. In the format of actionid -> { action dictionary }. */
@property NSDictionary * actions;

/** Source to be reported in event reporting. */
@property NSString * eventSource;

/** Additional attributes to be included in event reporting. */
@property NSDictionary * eventAttributes;

/** Payload of message to be included in event reporting. */
@property NSDictionary * eventPayload;

/** Convenience method for setting properties for inbox messages */
-(void)configureForSource:(NSString*)source inboxMessage:(MCEInboxMessage*)inboxMessage actions:(NSDictionary*)actions;

/** Convenience method for setting properties */
-(void)configureForSource:(NSString*)source attributes:(NSDictionary*)attributes attribution: (NSString*)attribution actions:(NSDictionary*)actions;

/** Convenience method for setting properties */
-(void)configureForSource:(NSString*)source attributes:(NSDictionary*)attributes attribution: (NSString*)attribution mailingId: (NSString*)mailingId actions:(NSDictionary*)actions;

@end

You will need to make these changes in your project as well. There should be one instance of MCEWebViewActionDelegate.h in the release SDK plugins/ios directory, and at least two instances of MCEWebViewActionDelegate.h under platforms/ios and plugins/co.acoustic.mobile.push.sdk/src/ios in your project.

Alternately, you could remove / reinstall the SDK plugin after making the changes to Cordova-3.8.0/plugins/co.acoustic.mobile.push.sdk/src/ios/AcousticMobilePush.framework/Headers/MCEWebViewActionDelegate.h.

Since you are in the process of building a Cordova release, be aware of an issue with extra slices being included in the release archive. Apple now rejects archives that include i386 and x86_64 slices. The extra slice is an issue between Cordova and Apple. A workaround for the slices issue is available in a StackOverflow article.


Did this page help you?