Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
-commit of v0.0.1beta-ACPTarget
Browse files Browse the repository at this point in the history
  • Loading branch information
sbenedicadb committed Sep 10, 2018
1 parent 1355d9f commit aecea49
Show file tree
Hide file tree
Showing 234 changed files with 31,932 additions and 0 deletions.
34 changes: 34 additions & 0 deletions ACPTargetBeta.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Pod::Spec.new do |s|
s.name = "ACPTargetBeta"
s.version = "0.0.1beta"
s.summary = "BETA - Target framework for Adobe Experience Cloud SDK. Written and Supported by Adobe, the official Pod for the Adobe Experience Cloud."
s.description = <<-DESC
By using the Adobe Cloud Platform SDKs (“Beta”), you hereby acknowledge that the Beta is provided “as is” without warranty of any kind. Adobe shall have no obligation to maintain, correct, update, change, modify or otherwise support the Beta. You are advised to use caution and not to rely in any way on the correct functioning or performance of such Beta and/or accompanying materials.
The target framework provides APIs that allow use of the Target product in the V5 Adobe Experience Cloud SDK.
DESC

s.homepage = "https://github.com/Adobe-Marketing-Cloud/acp-sdks/releases"

s.license = {:type => "Commercial", :text => "Adobe Systems, Incorporated. All Rights Reserved."}
s.author = "Adobe Cloud Platform SDK Team"
s.source = { :git => 'https://github.com/Adobe-Marketing-Cloud/acp-sdks.git', :tag => "v0.0.1beta-ACPTarget" }
s.platform = :ios, '10.0'

s.default_subspec = 'iOS'

# dependency on the core framework
s.dependency "ACPCoreBeta", ">= 0.0.1beta"

s.subspec 'iOS' do |ios|
ios.preserve_paths = '*/Frameworks/*.framework'
ios.source_files = 'Pod/Classes/**/*', 'ACPTarget_iOS.framework/Headers/*.h'
ios.public_header_files = 'ACPTarget_iOS.framework/Headers/*.h'
ios.vendored_frameworks = 'ACPTarget_iOS.framework', 'AdobeMarketingMobileTarget.framework'
ios.xcconfig = {
"FRAMEWORK_SEARCH_PATHS" => "'${PODS_ROOT}/ACPTarget'",
"LD_RUNPATH_SEARCH_PATHS" => "@loader_path/../Frameworks"
}
ios.requires_arc = true
end
end
Binary file added ACPTarget_iOS.framework/ACPTarget_iOS
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* ************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2018 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
**************************************************************************/

#import <UIKit/UIKit.h>

//! Project version number for AdobeMobileMarketingCore_iOS.
FOUNDATION_EXPORT double AdobeMobileMarketingCore_iOSVersionNumber;

//! Project version string for AdobeMobileMarketingCore_iOS.
FOUNDATION_EXPORT const unsigned char AdobeMobileMarketingCore_iOSVersionString[];

// import platform core public headers
#import <ACPCore_iOS/ADBExtension.h>
#import <ACPCore_iOS/ADBExtensionApi.h>
#import <ACPCore_iOS/ADBExtensionError.h>
#import <ACPCore_iOS/ADBExtensionEvent.h>
#import <ACPCore_iOS/ADBExtensionListener.h>
#import <ACPCore_iOS/ADBExtensionProcessor.h>
#import <ACPCore_iOS/ADBMarketingMobileCore.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* **************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2018 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
****************************************************************************/

#ifndef ADOBEMOBILE_ADBEXTENSIONINTERFACE_H
#define ADOBEMOBILE_ADBEXTENSIONINTERFACE_H

#import <Foundation/Foundation.h>
#import "ADBExtensionApi.h"

@interface ADBExtension : NSObject {}

/*
* @brief Initialize a new extension instance.
* Implementers can override this and call into the core via `self.api` e.g. to set listeners.
* The `api` method returns a valid interface even during `init`, since it will be created prior to `init` being called.
* @return Valid instance of the extension or nil
*
*/
- (nullable instancetype) init;

/*
* @brief Get extension name for use by the event hub to managing shared state and for logging.
* This MUST be overridden by the extension.
* This will be called at least once before {@code init}. Use a static initializer, don't wait for `init` method.
* If `nil` is returned, the extension will not be registered.
*
* @return NSString containing the extensions name
*
*/
- (nullable NSString*) name;

/*
* @brief Get extension version as a string for use by the event hub for logging.
* This should be overridden by the extension.
* If it is not overridden, `nil` will be returned and logged for the extension.
*
* @return NSString containing the extensions version
*
*/
- (nullable NSString*) version;

/*
* @brief Called when an unexpected error related to this extension has occurred during SDK processing.
* Implementers should override this to see what errors are occurring and handle them as needed.
* This should be called very infrequently for a well written extension implementation.
* @return
*
*/
- (void) unexpectedError: (nonnull NSError*) error;

/*
* @brief Called when the extension is unregistered by the core.
* Implementers can override this to clean up resources when the extension is released.
*
*/
- (void) onUnregister;

/*
* @brief This provides the services the extension will need.
*
*/
@property(nonatomic, readonly) ADBExtensionApi* _Nonnull api;

@end

#endif /* ADOBEMOBILE_ADBEXTENSIONINTERFACE_H */
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/* **************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2018 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
****************************************************************************/

#ifndef ADOBEMOBILE_ADBEXTENSIONSERVICES_H
#define ADOBEMOBILE_ADBEXTENSIONSERVICES_H

#import <Foundation/Foundation.h>
#import "ADBExtensionError.h"
#import "ADBExtensionEvent.h"
#import "ADBExtensionListener.h"
#import "ADBExtensionProcessor.h"

/*
* @brief This interface is used by extensions to call into the core event hub.
* High level documentation for this interface is here: https://wiki.corp.adobe.com/display/ADMSMobile/V5+Extensions
*/
@interface ADBExtensionApi : NSObject {}

/*
* @brief Called by the extension to register a processor to handle all events. When any event is fired, this interface will be called to process the event.
* @param processor A callback interface to receive events
* @param error An optional parameter where an NSError* will be returned if valid and NO was returned
* @return YES if processor was added, NO otherwise. For example if processing is not allowed.
*/
- (BOOL) registerProcessor: (nonnull Class) processorClass
error: (NSError* _Nullable* _Nullable) error;

/*
* @brief Called by the extension to register a listener for a specific event. When this event is fired, the listener interface will be called with details.
* @param listener A callback interface to receive events
* @param eventType The type of the event we are listening for. See documentation for the list of available types.
* @param eventSource The source for the events we are listening for. See documentation for the list of available sources.
* @param error An optional parameter where an NSError* will be returned if valid and NO was returned
* @return YES if listener was added, NO otherwise. For example if listening to this event is not allowed or event is unknown/unsupported.
*/
- (BOOL) registerListener: (nonnull Class) listenerClass
eventType: (nonnull NSString*) eventType
eventSource: (nonnull NSString*) eventSource
error: (NSError* _Nullable* _Nullable) error;

/*
* @brief Called by extension to dispatch an event for other extensions or the internal SDK to consume.
* @param event Event we are dispatching
* @param error An optional parameter where an NSError* will be returned if valid and NO was returned
* @return YES if event was dispatched, NO otherwise. For example if this extension is not allowed to dispatch this kind of event.
*/
- (BOOL) dispatchEvent: (nonnull ADBExtensionEvent*) event
error: (NSError* _Nullable* _Nullable) error;

/*
* @brief Called by extension to set a shared state for itself. Usually called from a listener during event processing.
* @param state State data (in JSON format). Passing `nil` will remove existing state data.
* @param event The event for which the state is being set. Passing `nil` will set default state for all events.
* @param error An optional parameter where an NSError* will be returned if valid and NO was returned
* @return YES if state was set, NO otherwise. For example if the JSON passed for the state data was invalid.
*/
- (BOOL) setSharedEventState: (nullable NSDictionary*) state
event: (nullable ADBExtensionEvent*) event
error: (NSError* _Nullable* _Nullable) error;

/*
* @brief Called by extension to clear all shared state it has previously set. Usually called during OnUnregister.
* @param error An optional parameter where an NSError* will be returned if valid and NO was returned
* @return YES if states were cleared, NO otherwise. For example if an internal error occurred.
*/
- (BOOL) clearSharedEventStates: (NSError* _Nullable* _Nullable) error;

/*
* @brief Called by extension from a listener to get a shared state during event processing.
* @param name State to retrieve data for. See documentation for the list of available states.
* @param event The event for which the state is being requested. Passing `nil` will retrieve latest state available.
* @param error An optional parameter where an NSError* will be returned in case of failure
* @return NULL if state does not exists or NSDictionary* containing state data at that version in JSON format
*/
- (nullable NSDictionary*) getSharedEventState: (nonnull NSString*) name
event: (nullable ADBExtensionEvent*) event
error: (NSError* _Nullable* _Nullable) error;

/*
* @brief Un-register this extension. This can be called at any time after SDK initialization.
* This will result in the ADBExtension::OnUnregister callback being called.
*/
- (void) unregisterExtension;

@end

#endif /* ADOBEMOBILE_ADBEXTENSIONSERVICES_H */
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* **************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2018 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
****************************************************************************/

#ifndef ADOBEMOBILE_ADBEXTENSIONERROR_H
#define ADOBEMOBILE_ADBEXTENSIONERROR_H

#import <Foundation/Foundation.h>

extern NSString* _Nonnull const ADBExtensionErrorDomain;

/**
* @brief Errors that can be returned by either any of the 3rd party extension APIs.
*/
typedef NS_ENUM(NSUInteger, ADBExtensionError) {
ADBUnexpectedExtensionError = 0,
ADBBadExtensionNameExtensionError = 1,
ADBDuplicateExtensionNameExtensionError = 2,
ADBEventTypeNotSupportedExtensionError = 3,
ADBEventSourceNotSupportedExtensionError = 4,
ADBEventDataNotSupportedExtensionError = 5,
ADBBadExtensionClassExtensionError = 6
};

#endif /* ADOBEMOBILE_ADBEXTENSIONERROR_H */

Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* **************************************************************************
*
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2018 Adobe Systems Incorporated
* All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe Systems Incorporated and its suppliers,
* if any. The intellectual and technical concepts contained
* herein are proprietary to Adobe Systems Incorporated and its
* suppliers and are protected by trade secret or copyright law.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe Systems Incorporated.
****************************************************************************/

#ifndef ADOBEMOBILE_ADBEXTENSIONEVENT_H
#define ADOBEMOBILE_ADBEXTENSIONEVENT_H

#import <Foundation/Foundation.h>

@interface ADBExtensionEvent : NSObject {}

/**
* @brief Create a new broadcast event. See TBD for a list of supported types, sources and data formats.
* @param name The name of the event to be dispatched.
* @param type The type of the event to be dispatched.
* @param source The source of the event to be dispatched.
* @param data (Optional) Data associated with the event. The NSDictionary passed should follow NSCoding protocol.
* @param error (Optional) NSError** where any errors constructing the event can be reported.
* @return a new instance of ADBExtensionEvent
*/
+ (nullable instancetype) extensionEventWithName: (nonnull NSString*) name
type: (nonnull NSString*) type
source: (nonnull NSString*) source
data: (nullable NSDictionary*) data
error: (NSError* _Nullable* _Nullable) error;

/**
* @brief Event details
*/
@property(nonatomic, readonly) NSString* _Nonnull eventName;
@property(nonatomic, readonly) NSString* _Nonnull eventType;
@property(nonatomic, readonly) NSString* _Nonnull eventSource;
@property(nonatomic, readonly) NSDictionary* _Nullable eventData;

@end

#endif /* ADOBEMOBILE_ADBEXTENSIONEVENT_H */
Loading

0 comments on commit aecea49

Please sign in to comment.