Giter VIP home page Giter VIP logo

aepsdk-target-ios's Introduction

AEPTarget

Cocoapods SPM CircleCI

About this project

The AEPTarget helps test, personalize, and optimize mobile app experiences based on user behavior and mobile context. You can deliver interactions that engage and convert through iterative testing and rules-based and AI-powered personalization.

Requirements

  • Xcode 15 (or newer)
  • Swift 5.1 (or newer)

Installation

# Podfile
use_frameworks!

# for app development, include all the following pods
target 'YOUR_TARGET_NAME' do
    pod 'AEPTarget'
    pod 'AEPCore'
end

To add the AEPTarget Package to your application, from the Xcode menu select:

File > Swift Packages > Add Package Dependency...

Enter the URL for the AEPTarget package repository: https://github.com/adobe/aepsdk-target-ios.git.

When prompted, specify the Version rule using a specific version range or an exact version.

Alternatively, if your project has a Package.swift file, you can add AEPTarget directly to your dependencies:

dependencies: [
    .package(url: "https://github.com/adobe/aepsdk-target-ios.git", .upToNextMajor(from: "5.0.0")),
],
targets: [
    .target(name: "YourTarget",
            dependencies: ["AEPTarget"],
	    path: "your/path")
]

Binaries

Run the following command, from the project root directory, to generate the AEPTarget.xcframework in the build directory. But, first run make pod-install command to ensure the dependencies are installed.

make archive

Development

The first time you clone or download the project, you should run the following from the root directory to setup the environment:

make pod-install

Subsequently, you can make sure your environment is updated by running the following:

make pod-update

Open the Xcode workspace

Open the workspace in Xcode by running the following command from the root directory of the repository:

make open

Command line integration

You can run all the test suites from command line:

make test

Documentation

Additional documentation for API usage can be found under the Documentation directory.

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.

aepsdk-target-ios's People

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aepsdk-target-ios's Issues

Add assurance to Test Apps

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Epic: Preview

  • Preview Manager
  • Preview Manager Unit Tests
  • Preview Public and helper APIs
  • Documentation

Epic: CI/CD

  • Using CircleCI before making repo public #22
  • Release automation #3

make archive fails to build

Expected Behavior

After running make archive, we expect the build to not fail and output frameworks to the build path.

Actual Behavior

Makefile fails to build XCFramework's successfully.

Reproduce Scenario (including but not limited to)

Steps to Reproduce

  1. Get project fresh (git clone) from this repo.
  2. run make archive from terminal

Platform and Version

Mac OS version Big Sur 11.6.1 using Xcode 13.1

Sample Code that illustrates the problem

Not code related.

Logs taken while reproducing problem

Corrective action is suggested in two areas:

  1. Notify the user to run pod install in the README.md file
  2. the swiftformat dependency is missing, and is needed to complete archive. Suggest the user not be required to install it themselves, since CocoaPods is being used for other. Instead leverage CocoaPods to also install swiftformat dependency. This also includes a subtle change in XCodeProject to use swiftformat installed in PODS rather than environment. This affords you with ability to "pin" a specific swiftformat version in future as well for compatibility reasons if ever needed.

Also noteworthy -- why is this repo using swiftformat while other Adobe modules are using SwiftLint? Consistency?

Set the environment id in the Target request

static func build(tntId: String?, thirdPartyId: String?, identitySharedState: [String: Any]?, lifecycleSharedState: [String: Any]?, targetPrefetchArray: [TargetPrefetch]? = nil, targetRequestArray: [TargetRequest]? = nil, targetParameters: TargetParameters? = nil, notifications: [Notification]? = nil, environmentId _: Int64 = 0, propertyToken: String? = nil) -> TargetDeliveryRequest? {

We didn't set the environment id in the Target request, need to fix it.

Add an Objective C test app

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Add xcframeworks to release

Now that aepsdk-core-ios and aepsdk-assurance-ios are both making XCframeworks available with their latest release (4.0.0), can we ensure that XCFramework binaries are released for target as well?

Store latest config

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Epic: Integration Tests

  • Prefetch Integration tests
  • Preview Integration tests
  • Batch Integration tests
  • Notification integration tests

AEPTarget fails to compile when linked against tvOS target

When attempting to compile a tvOS target that links the AEPTarget Swift package, the compilation fails with error Cannot find type FullScreenPresentable.

TheFullScreenPresentable protocol is defined in the AEPCore library, but the definition is wrapped in an if os(iOS) flag. This type is then undefined on tvOS.

In our project, various AE libraries are linked adjacently in a shared service package ("shared" by all Apple platforms we support, including iOS and tvOS):AEPCore, AEPAnalytics, AEPMedia. AEPTarget must be linked with these in this shared package, because AEPTarget must use the common initializer alongside the other extensions in our shared package code.

Although it is possible to link AEPTarget directly to the iOS project (as opposed to our shared Services package), it does not appear possible to initialize it or load it's shared extension discretely. Because it must be initialized with the other extensions (and common core), and those components are cross-platform, we cannot currently link AEPTarget to our iOS project directly or our shared Service package (which iOS uses).

It would appear that instances within AEPTarget which reference the FullScreenPresentable protocol also need to be wrapped in if os(iOS) at the call site. These appear to pertain to iOS specific view presentation (to which there is currently no equivalent tvOS behavior), so this appears to be a relatively straightforward and constrained change.

Pin Rules Engine to exact version

Expected Behaviour

All dependencies for a given version of the Target package are pinned to exact versions

Actual Behaviour

https://github.com/adobe/aepsdk-rulesengine-ios.git is set to upToNextMajor in Package.swift - this means SPM in Xcode is more likely to regularly re-resolve packages and can mean what gets built on CI is different to what has been built locally.

Sample Code that illustrates the problem

.package(url: "https://github.com/adobe/aepsdk-core-ios.git", .upToNextMajor(from: "3.1.0")),

Change to:

.package(url: "https://github.com/adobe/aepsdk-core-ios.git", .exact("3.1.0")),

Preview events

Expected Behaviour

Actual Behaviour

Reproduce Scenario (including but not limited to)

Steps to Reproduce

Platform and Version

Sample Code that illustrates the problem

Logs taken while reproducing problem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.