Skip to content

Commit

Permalink
Merge pull request #25 from Tealium/rnpm-migrate
Browse files Browse the repository at this point in the history
Migrate off of rnpm
  • Loading branch information
jonathanswong authored Sep 11, 2019
2 parents e310956 + 6d20fa7 commit 8c17c1c
Show file tree
Hide file tree
Showing 105 changed files with 963 additions and 135 deletions.
1 change: 1 addition & 0 deletions TealiumSampleApp/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ android {
}

dependencies {
implementation project(':tealium-react-native')
implementation project(':tealium-react-native')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
Expand Down
344 changes: 344 additions & 0 deletions TealiumSampleApp/android/app/src/main/assets/index.android.bundle

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.facebook.react.ReactApplication;
import com.tealiumreactnative.TealiumPackage;
import com.tealiumreactnative.TealiumPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
Expand Down
10 changes: 4 additions & 6 deletions TealiumSampleApp/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext {
buildToolsVersion = "28.0.1"
minSdkVersion = 16
minSdkVersion = 19
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
Expand Down Expand Up @@ -32,11 +32,9 @@ allprojects {
maven {
url "http://maven.tealiumiq.com/android/releases/"
}
maven {
url "http://maven.tealiumiq.com/android/releases/"
}
}
}


task wrapper(type: Wrapper) {
gradleVersion = '4.4'
distributionUrl = distributionUrl.replace("bin", "all")
}
Binary file modified TealiumSampleApp/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
22 changes: 19 additions & 3 deletions TealiumSampleApp/android/gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down
18 changes: 17 additions & 1 deletion TealiumSampleApp/android/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 2 additions & 0 deletions TealiumSampleApp/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
rootProject.name = 'TealiumSampleApp'
include ':tealium-react-native'
project(':tealium-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/tealium-react-native/android')
include ':tealium-react-native'
project(':tealium-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/tealium-react-native/android')

include ':app'
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// TEALConfiguration+TagManagement.h
// UIKitCatalog
// Tealium
//
// Created by Jason Koo on 1/10/16.
//
Expand Down Expand Up @@ -38,4 +38,14 @@
*/
- (void) setRemoteCommandsEnabled:(BOOL)enabled;

/**
Optionally use legacy WebView.
*/
@property (nonatomic, assign) BOOL useLegacyWebView;

/**
Optionally set a view for WKWebView to attach to.
*/
@property (nonatomic, strong) UIView *_Nullable view;

@end
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
#import "TEALLogLevels.h"
#import "TEALConsentConstants.h"

#ifdef TEAL_TARGET_IOS
#import <UIKit/UIKit.h>
#endif

/**
Defines the endpoint of where to send data for the CollectDispatchService.
*/
typedef NS_ENUM(NSInteger, TEALCollectURL) {
Vdata,
Event
TEALCollectURLVdata,
TEALCollectURLEvent
};

/**
Expand Down Expand Up @@ -74,7 +78,7 @@ typedef NS_ENUM(NSInteger, TEALCollectURL) {
/**
Optionally set initial userConsentCategories.
*/
@property (nonatomic, strong) NSArray *userConsentCategories;
@property (nonatomic, strong) NSArray *_Nullable userConsentCategories;

/**
Optionally set initial userConsentStatus.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
@property (nonatomic, readonly) BOOL isEnabled;
@property (nonatomic, readonly) BOOL consentConfigurationWasLoaded; // TiQ property for WebView

- (instancetype _Nullable)initWithURLSessionManager:(TEALURLSessionManager *_Nonnull)sessionManager delegate:(id <TEALConsentManagerDelegate>_Nullable)delegate;
- (instancetype _Nullable)initWithURLSessionManager:(TEALURLSessionManager *_Nonnull)sessionManager delegate:(id <TEALConsentManagerDelegate>_Nullable)delegate NS_DESIGNATED_INITIALIZER;

- (instancetype _Nullable)init NS_UNAVAILABLE;
- (instancetype _Nonnull)init NS_UNAVAILABLE;

/**
Enables consent manager.
Expand Down Expand Up @@ -69,7 +69,7 @@
@param categories the categories the user has consented to.
*/
- (void)setUserConsentCategories:(NSArray *)categories;
- (void)setUserConsentCategories:(NSArray *_Nonnull)categories;

/**
Sets the consentStatus and categories for a user.
Expand Down Expand Up @@ -118,7 +118,7 @@
@returns NSArray: acceptable category names only. Empty array if no valid categories.
*/
- (NSArray *_Nonnull)filteredCategories:(NSArray *)categories;
- (NSArray *_Nonnull)filteredCategories:(NSArray *_Nonnull)categories;

/**
Enables consent logging which sends an additional log on consent state changes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@ typedef void (^TEALDispatchBlock)(TEALDispatchStatus status, TEALDispatch * _Non
* Converts a NSDictionary to a TEALDispatch
*/

+ (TEALDispatch * _Nonnull)fromDictionary:(NSDictionary* _Nullable)dictionary;
+ (TEALDispatch * _Nullable)fromDictionary:(NSDictionary* _Nullable)dictionary;

/**
Adds dataSources to the payload.
@param dataSources NSDictionary to add to the dispatch.
*/
- (void)addDataSources:(NSDictionary *)dataSources;
- (void)addDataSources:(NSDictionary *_Nonnull)dataSources;

/**
Creates a TEALDispatch given a payload.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- (BOOL)isValid;

/**
* Visitor ID addociated with this profile
* Visitor ID associated with this profile
*
* @return String representation of user's vistorID
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// TEALVisitorProfileAudienceAttribute.h
// Tealium Mobile Library
//
// Created by George Webster on 6/8/15.
// Copyright (c) 2015 Tealium Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "TEALVisitorProfileBaseAttribute.h"

@interface TEALVisitorProfileAudienceAttribute : TEALVisitorProfileBaseAttribute <NSCoding, NSCopying, NSSecureCoding>

/**
* Name of the Audience, this is a display name, all attributes are refenerenced by their unique attributeID
*
* @return string of the human friendly name or nil.
*/
- (NSString *)name;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// TEALVisitorProfileBadgeAttribute.h
// Tealium Mobile Library
//
// Created by George Webster on 6/8/15.
// Copyright (c) 2015 Tealium Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

#import "TEALVisitorProfileBaseAttribute.h"

@interface TEALVisitorProfileBadgeAttribute : TEALVisitorProfileBaseAttribute <NSCoding, NSCopying>

/**
* Name of the Audience, this is a display name, all attributes are refenerenced by their unique attributeID
*
* @return string of the human friendly name or nil.
*/
- (NSString *)name;

@end

Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// TEALVisitorProfileAttribute.h
// Tealium Mobile Library
//
// Created by George Webster on 2/4/15.
// Copyright (c) 2015 Tealium Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
* Type of Visitor Profile Attribute
*/
typedef NS_ENUM(NSInteger, TEALVisitorProfileAttributeType) {
/**
* Profile Audience
*/
TEALVisitorProfileAttributeTypeAudience,
/**
* Profile Badge
*/
TEALVisitorProfileAttributeTypeBadge,
/**
* Profile Date
*/
TEALVisitorProfileAttributeTypeDate,
/**
* Profile Flag
*/
TEALVisitorProfileAttributeTypeFlag,
/**
* Profile Metric
*/
TEALVisitorProfileAttributeTypeMetric,
/**
* Profile Property or "Trait" in the AudienceStream App
*/
TEALVisitorProfileAttributeTypeProperty
};

@interface TEALVisitorProfileBaseAttribute : NSObject <NSCoding>

/**
* Constructor method.
*
* @param type Type of TEALVisitorProfileAttributeType that this base attribute
* should be.
*/
- (instancetype)initWithType:(TEALVisitorProfileAttributeType)type;

/**
* Compares relavent properties of two attributes for equality
*
* @param object Any NSObject, only TEALVisitorProfileBaseAttribute subclasses can return a true result.
*
* @return boolean of true if relavent values are equal, regardles of object hashing or non relavant properties.
*/
- (BOOL)isEqualAttribute:(id)object;

/**
* ID of the attribute
*
* @return string value of the attribute's ID
*/
- (NSString *)attributeID;

/**
* Type of attribute
*
* @return valid TEALVisitorProfileAttributeType type
*/
- (TEALVisitorProfileAttributeType)type;

@end



Loading

0 comments on commit 8c17c1c

Please sign in to comment.