Skip to content

Commit

Permalink
Merge pull request #48 from urbanairship/MB-2052
Browse files Browse the repository at this point in the history
[MB-2052] Release 3.2.0
  • Loading branch information
hcrowell authored Dec 6, 2016
2 parents af50623 + 46b99c6 commit 5fa2966
Show file tree
Hide file tree
Showing 130 changed files with 572 additions and 300 deletions.
Binary file modified Assets/Plugins/iOS/Airship/AirshipResources.bundle/Info.plist
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
106 changes: 106 additions & 0 deletions Assets/Plugins/iOS/Airship/AirshipResources.bundle/UANativeBridge
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
UAirship.callbackID = 0;

UAirship.delegateCallURL = function() {
if (!arguments.length) {
throw new Error("UAirship.delegateCallURL expects at least one function argument");
}

var argumentsArray = Array.prototype.slice.call(arguments);

//treat the first arguments as the command name
var name = argumentsArray[0];

//the rest are path arguments and query options
var args = argumentsArray.slice(1);

var uri = [];
var dict = null;

// get arguments and dictionary
for (var i = 0; i < args.length; i++) {

var arg = args[i];

if (arg === undefined || arg === null) {
arg = '';
}

if (typeof(arg) == 'object') {
dict = arg;
} else {
uri.push(encodeURIComponent(arg));
}
}

// flatten arguments into url
var url = "uairship://" + name + "/" + uri.join("/");

// flatten dictionary into url
if (dict !== null) {
var query_args = [];
for (var name in dict) {
query_args.push(encodeURIComponent(name) + "=" + encodeURIComponent(dict[name]));
}

if (query_args.length > 0) {
url += "?" + query_args.join("&");
}
}

return url;
}

UAirship.invoke = function(url) {
var frame = document.createElement('iframe');
frame.style.display = 'none';
frame.src = url;

document.body.appendChild(frame);
frame.parentNode.removeChild(frame);
}

UAirship.runAction = function(actionName, argument, callback) {
var opt = {};

UAirship.callbackID++;
var callbackKey = 'ua-cb-' + (UAirship.callbackID);

opt[actionName] = JSON.stringify(argument);

var url = UAirship.delegateCallURL('run-action-cb', callbackKey, opt);

window[callbackKey] = onready;

function onready(err, data) {
delete window[callbackKey];

if (!callback) {
return;
}

if(err) {
callback(err);
} else {
callback(null, data);
}
}

UAirship.invoke(url);
}

UAirship.finishAction = function(err, data, callbackKey) {
if (callbackKey in window) {
var cb = window[callbackKey];
cb(err, data);
};
}

UAirship.close = function() {
UAirship.runAction('__close_window_action', null, null);
}

UAirship.isReady = true;

var uaLibraryReadyEvent = document.createEvent('Event');
uaLibraryReadyEvent.initEvent('ualibraryready', true, true);
document.dispatchEvent(uaLibraryReadyEvent);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 0 additions & 11 deletions Assets/Plugins/iOS/Airship/Common/JS/UANativeBridge.h

This file was deleted.

80 changes: 0 additions & 80 deletions Assets/Plugins/iOS/Airship/Common/UATagUtils.h

This file was deleted.

89 changes: 0 additions & 89 deletions Assets/Plugins/iOS/Airship/Common/UAUserAPIClient.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#import "UANativeBridge.h"
#import "UALandingPageAction.h"
#import "AirshipKit.h"
#import "NSJSONSerialization+UAAdditions.h"
#import "NSManagedObjectContext+UAAdditions.h"
#import "NSOperationQueue+UAAdditions.h"
#import "NSString+UALocalizationAdditions.h"
#import "NSString+UAURLEncoding.h"
#import "UA_Base64.h"
#import "UAAccountEventTemplate.h"
#import "UAAction+Operators.h"
#import "UAAction.h"
Expand All @@ -27,6 +29,7 @@
#import "UABeveledLoadingIndicator.h"
#import "UACancelSchedulesAction.h"
#import "UAChannelCapture.h"
#import "UAChannelRegistrar.h"
#import "UACircularRegion.h"
#import "UAConfig.h"
#import "UACustomEvent.h"
Expand All @@ -39,57 +42,55 @@
#import "UADisplayInboxAction.h"
#import "UADisposable.h"
#import "UAEvent.h"
#import "UAFetchDeviceInfoAction.h"
#import "UAGlobal.h"
#import "UAInAppMessage.h"
#import "UAInAppMessageButtonActionBinding.h"
#import "UAInAppMessageControllerDefaultDelegate.h"
#import "UAInAppMessageControllerDelegate.h"
#import "UAInAppMessageView.h"
#import "UAInAppMessaging.h"
#import "UAInbox.h"
#import "UAInboxMessage.h"
#import "UAInboxMessageList.h"
#import "UAInboxUtils.h"
#import "UAIncomingInAppMessageAction.h"
#import "UAInstallAttributionEvent.h"
#import "UAirship.h"
#import "UAJavaScriptDelegate.h"
#import "UAJSONMatcher.h"
#import "UAJSONPredicate.h"
#import "UAJSONValueMatcher.h"
#import "UALandingPageAction.h"
#import "UALandingPageOverlayController.h"
#import "UALocation.h"
#import "UALocationEvent.h"
#import "UAMediaEventTemplate.h"
#import "UAMessageCenterDateUtils.h"
#import "UAMessageCenterLocalization.h"
#import "UAModifyTagsAction.h"
#import "UANamedUser.h"
#import "UANotificationAction.h"
#import "UANotificationCategories.h"
#import "UANotificationCategory.h"
#import "UANotificationContent.h"
#import "UANotificationResponse.h"
#import "UAOpenExternalURLAction.h"
#import "UAOverlayInboxMessageAction.h"
#import "UAPasteboardAction.h"
#import "UAProximityRegion.h"
#import "UAPush.h"
#import "UARegionEvent.h"
#import "UARemoveTagsAction.h"
#import "UARetailEventTemplate.h"
#import "UARichContentWindow.h"
#import "UAScheduleAction.h"
#import "UAScheduleTrigger.h"
#import "UAShareAction.h"
#import "UATagUtils.h"
#import "UAURLProtocol.h"
#import "UAUser.h"
#import "UAUserAPIClient.h"
#import "UAUtils.h"
#import "UAWebViewCallData.h"
#import "UAWebViewDelegate.h"
#import "UAWhitelist.h"
#import "UIWebView+UAAdditions.h"
#import "UA_Base64.h"
#import "UAInbox.h"
#import "UAInboxMessage.h"
#import "UAInboxMessageList.h"
#import "UAInboxUtils.h"
#import "UAChannelRegistrar.h"
#import "UANamedUser.h"
#import "UANotificationAction.h"
#import "UANotificationCategories.h"
#import "UANotificationCategory.h"
#import "UANotificationContent.h"
#import "UANotificationResponse.h"
#import "UAPush.h"
Loading

0 comments on commit 5fa2966

Please sign in to comment.