Skip to content

Commit 3c7e378

Browse files
author
Alexis Oyama
committed
Merge branch 'release/2.0.2'
2 parents 039cc14 + 9d2f933 commit 3c7e378

File tree

11 files changed

+2567
-39
lines changed

11 files changed

+2567
-39
lines changed

.doxygen

Lines changed: 2457 additions & 0 deletions
Large diffs are not rendered by default.

Example/Leanplum-SDK.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
023AD62018D26E4D7B906F56 /* libPods-Leanplum-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A528472EB95B5050BE664390 /* libPods-Leanplum-SDK_Example.a */; };
10+
4D5A32F652662A8CC221AAF8 /* Pods_Leanplum_SDK_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4D30EC90BF70F6ACCD15929C /* Pods_Leanplum_SDK_Example.framework */; };
1111
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
1212
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
1313
6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
@@ -21,12 +21,12 @@
2121
6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; };
2222
6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; };
2323
873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; };
24-
AEB95A90C8EF7920EB439ACA /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A5FC397E4B653E5CE9DC3267 /* libPods-Leanplum-tvOS-SDK_Example.a */; };
2524
B5CCCA2D1D74B64D005ADEE1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA2C1D74B64D005ADEE1 /* main.m */; };
2625
B5CCCA301D74B64D005ADEE1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA2F1D74B64D005ADEE1 /* AppDelegate.m */; };
2726
B5CCCA331D74B64D005ADEE1 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B5CCCA321D74B64D005ADEE1 /* ViewController.m */; };
2827
B5CCCA361D74B64D005ADEE1 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B5CCCA341D74B64D005ADEE1 /* Main.storyboard */; };
2928
B5CCCA381D74B64D005ADEE1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B5CCCA371D74B64D005ADEE1 /* Assets.xcassets */; };
29+
CC927D3CDC15A28D0E164F51 /* Pods_Leanplum_tvOS_SDK_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A62910CD90F963A1F413BC96 /* Pods_Leanplum_tvOS_SDK_Example.framework */; };
3030
/* End PBXBuildFile section */
3131

3232
/* Begin PBXContainerItemProxy section */
@@ -42,6 +42,7 @@
4242
/* Begin PBXFileReference section */
4343
1982CE36FE54461D3A24D6B5 /* Pods-Leanplum-tvOS-SDK_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-tvOS-SDK_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-tvOS-SDK_Example/Pods-Leanplum-tvOS-SDK_Example.debug.xcconfig"; sourceTree = "<group>"; };
4444
29ABF5FA9E1826C5BBE433C9 /* Pods-Leanplum-SDK_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Leanplum-SDK_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Leanplum-SDK_Tests/Pods-Leanplum-SDK_Tests.debug.xcconfig"; sourceTree = "<group>"; };
45+
4D30EC90BF70F6ACCD15929C /* Pods_Leanplum_SDK_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_SDK_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4546
6003F58A195388D20070C39A /* Leanplum-SDK_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Leanplum-SDK_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4647
6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
4748
6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@@ -66,9 +67,8 @@
6667
7849230A3D5C6DE5929ED1C8 /* Pods_Leanplum_SDK_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_SDK_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6768
84A3C33C701600A874B8C63F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
6869
873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = "<group>"; };
69-
A528472EB95B5050BE664390 /* libPods-Leanplum-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7070
A54ACCFCB36AE8C874708A7F /* libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
71-
A5FC397E4B653E5CE9DC3267 /* libPods-Leanplum-tvOS-SDK_Example.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Leanplum-tvOS-SDK_Example.a"; sourceTree = BUILT_PRODUCTS_DIR; };
71+
A62910CD90F963A1F413BC96 /* Pods_Leanplum_tvOS_SDK_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Leanplum_tvOS_SDK_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
7272
B5CCCA291D74B64D005ADEE1 /* Leanplum-tvOS-SDK_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Leanplum-tvOS-SDK_Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
7373
B5CCCA2C1D74B64D005ADEE1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
7474
B5CCCA2E1D74B64D005ADEE1 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
@@ -91,7 +91,7 @@
9191
6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */,
9292
6003F592195388D20070C39A /* UIKit.framework in Frameworks */,
9393
6003F58E195388D20070C39A /* Foundation.framework in Frameworks */,
94-
023AD62018D26E4D7B906F56 /* libPods-Leanplum-SDK_Example.a in Frameworks */,
94+
4D5A32F652662A8CC221AAF8 /* Pods_Leanplum_SDK_Example.framework in Frameworks */,
9595
);
9696
runOnlyForDeploymentPostprocessing = 0;
9797
};
@@ -109,7 +109,7 @@
109109
isa = PBXFrameworksBuildPhase;
110110
buildActionMask = 2147483647;
111111
files = (
112-
AEB95A90C8EF7920EB439ACA /* libPods-Leanplum-tvOS-SDK_Example.a in Frameworks */,
112+
CC927D3CDC15A28D0E164F51 /* Pods_Leanplum_tvOS_SDK_Example.framework in Frameworks */,
113113
);
114114
runOnlyForDeploymentPostprocessing = 0;
115115
};
@@ -148,8 +148,8 @@
148148
6003F5AF195388D20070C39A /* XCTest.framework */,
149149
7849230A3D5C6DE5929ED1C8 /* Pods_Leanplum_SDK_Tests.framework */,
150150
A54ACCFCB36AE8C874708A7F /* libPods-Leanplum-SDK_Example-Leanplum-SDK_Tests.a */,
151-
A528472EB95B5050BE664390 /* libPods-Leanplum-SDK_Example.a */,
152-
A5FC397E4B653E5CE9DC3267 /* libPods-Leanplum-tvOS-SDK_Example.a */,
151+
4D30EC90BF70F6ACCD15929C /* Pods_Leanplum_SDK_Example.framework */,
152+
A62910CD90F963A1F413BC96 /* Pods_Leanplum_tvOS_SDK_Example.framework */,
153153
);
154154
name = Frameworks;
155155
sourceTree = "<group>";

Example/Podfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if ! ENV['LP_STATIC']
2+
use_frameworks!
3+
end
4+
15
target 'Leanplum-SDK_Example' do
26
platform :ios, '6.0'
37

Leanplum-SDK/Classes/Constants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#define IS_NOOP ((!IS_SUPPORTED_IOS_VERSION) || IS_JAILBROKEN || [LPConstantsState sharedState].isTestMode || [LPConstantsState sharedState].isInPermanentFailureState)
4545
#define RETURN_IF_NOOP if (IS_NOOP) return
4646

47-
#define LEANPLUM_SDK_VERSION @"2.0.1"
47+
#define LEANPLUM_SDK_VERSION @"2.0.2"
4848
#define LEANPLUM_CLIENT @"ios"
4949

5050
// Can upload up to 100 files or 50 MB per request.

Leanplum-SDK/Classes/LPActionManager.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,9 @@ - (void)listenForLocalNotifications
830830
} else {
831831
mutableInfo = [NSMutableDictionary dictionary];
832832
}
833+
834+
// Adding body message manually.
835+
mutableInfo[@"aps"] = @{@"alert":@{@"body": message} };
833836

834837
// Specify open action
835838
if (openAction) {

Leanplum-SDK/Classes/LPVarCache.m

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,26 +128,30 @@ + (NSArray *)getNameComponents:(NSString *)name
128128

129129
+ (id)traverse:(id)collection withKey:(id)key autoInsert:(BOOL)autoInsert
130130
{
131+
id result = nil;
131132
if ([collection respondsToSelector:@selector(objectForKey:)]) {
132-
id result = [collection objectForKey:key];
133+
result = [collection objectForKey:key];
133134
if (autoInsert && !result && [key isKindOfClass:NSString.class]) {
134135
result = [NSMutableDictionary dictionary];
135136
[collection setObject:result forKey:key];
136137
}
137-
return result;
138138
} else if ([collection isKindOfClass:[NSArray class]]) {
139139
int index = [key intValue];
140140
NSArray *arrayCollection = collection;
141141
if (arrayCollection.count > index) {
142-
id result = arrayCollection[index];
142+
result = arrayCollection[index];
143143
if (autoInsert && !result && [key isKindOfClass:NSString.class]) {
144144
result = [NSMutableArray array];
145145
[collection setObject:result atIndex:index];
146146
}
147-
return result;
148147
}
149148
}
150-
return nil;
149+
150+
if ([result isKindOfClass:[NSNull class]]) {
151+
return nil;
152+
}
153+
154+
return result;
151155
}
152156

153157
+ (void)registerFile:(NSString *)stringValue withDefaultValue:(NSString *)defaultValue

Leanplum-SDK/Classes/Leanplum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//
22
// Leanplum.h
3-
// Leanplum iOS SDK Version 2.0.1
3+
// Leanplum iOS SDK Version 2.0.2
44
//
55
// Copyright (c) 2012 Leanplum, Inc. All rights reserved.
66
//

Leanplum-iOS-SDK-source.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'Leanplum-iOS-SDK-source'
11-
s.version = '2.0.1'
11+
s.version = '2.0.2'
1212
s.summary = 'Mobile Marketing Platform. Integrated. ROI Engine.'
1313
s.description = <<-DESC
1414
Leanplum’s integrated solution delivers meaningful engagement across messaging and the in-app

build.sh

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,11 @@ main() {
6767
if [[ -z "${BUILD_NUMBER+x}" ]]; then
6868
BUILD_NUMBER=$(date "+%s")
6969
fi
70-
export IOS_VERSION_STRING="$IOS_VERSION+$BUILD_NUMBER"
70+
export IOS_VERSION_STRING=${IOS_VERSION_STRING:-"$IOS_VERSION.$BUILD_NUMBER"}
7171

72-
LEANPLUM_SDK_ROOT=${LEANPLUM_SDK_ROOT:-"$(pwd)/."}
73-
RELEASE_DIR_BASE=${RELEASE_DIR_BASE:-"$LEANPLUM_SDK_ROOT/Release"}
72+
SDK_DIR=${SDK_DIR:-"$(pwd)/."}
73+
RELEASE_DIR_BASE=${RELEASE_DIR_BASE:-"$SDK_DIR/Release"}
74+
LEANPLUM_PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER:-"s"}
7475
CONFIGURATION=${CONFIGURATION:-"Release"}
7576
BUILD_DIR=${BUILD_DIR:-"/tmp/AppleSDK-build"}
7677
BUILD_ROOT=${BUILD_ROOT:-"/tmp/AppleSDK-build"}
@@ -100,19 +101,19 @@ main() {
100101
mkdir -p "$RELEASE_DIR"
101102

102103
# Build Dynamic Framework
103-
cd "$LEANPLUM_SDK_ROOT/Example/"
104+
cd "$SDK_DIR/Example/"
104105
pod install
105-
cd "$LEANPLUM_SDK_ROOT/Example/Pods"
106+
cd "$SDK_DIR/Example/Pods"
106107
build_ios_dylib
107108

108109
# Build Static Framework
109110
RELEASE_DIR="$RELEASE_DIR_BASE/static"
110111
mkdir -p "$RELEASE_DIR"
111112

112113
export LP_STATIC=1
113-
cd "$LEANPLUM_SDK_ROOT/Example/"
114+
cd "$SDK_DIR/Example/"
114115
pod install
115-
cd "$LEANPLUM_SDK_ROOT/Example/Pods"
116+
cd "$SDK_DIR/Example/Pods"
116117
build_ios
117118

118119
echo "${GREEN} Done.${NORMAL}"
@@ -128,28 +129,33 @@ main() {
128129
# None
129130
#######################################
130131
build_ios() {
131-
echo "Starting build for Leanplum-SDK (iOS)"
132+
echo "Starting static build for Leanplum-SDK (iOS)"
132133

133134
run "Building Leanplum-SDK (device/armv7) target ..." \
134135
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
135136
"$ACTION" ARCHS='armv7' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7_DIR}" \
136-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
137+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
138+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
137139
run "Building Leanplum-SDK (device/armv7s) target ..." \
138140
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
139141
"$ACTION" ARCHS='armv7s' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7S_DIR}" \
140-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
142+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
143+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
141144
run "Building Leanplum-SDK (device/arm64) target ..." \
142145
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
143146
"$ACTION" ARCHS='arm64' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARM64_DIR}" \
144-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
147+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
148+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
145149
run "Building Leanplum-SDK (simulator/i386) target ..." \
146150
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
147151
"$ACTION" ARCHS='i386' VALID_ARCHS='i386' RUN_CLANG_STATIC_ANALYZER=NO \
148-
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
152+
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
153+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
149154
run "Building Leanplum-SDK (simulator/x86_64) target ..." \
150155
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
151156
"$ACTION" ARCHS='x86_64' VALID_ARCHS='x86_64' RUN_CLANG_STATIC_ANALYZER=NO \
152-
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
157+
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
158+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
153159

154160
mkdir "${RELEASE_DIR}/Leanplum.framework/"
155161
run "Combining builds to universal fat library ..." \
@@ -176,8 +182,8 @@ framework module Leanplum {
176182
EOF
177183

178184
# Copy headers.
179-
cp "$LEANPLUM_SDK_ROOT/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
180-
cp "$LEANPLUM_SDK_ROOT/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
185+
cp "$SDK_DIR/Leanplum-SDK/Classes/Leanplum.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
186+
cp "$SDK_DIR/Leanplum-SDK/Classes/LPInbox.h" "${RELEASE_DIR}/Leanplum.framework/Headers"
181187

182188
printf "%s\n" "Successfully built Leanplum-SDK (iOS) Framework."
183189
}
@@ -192,28 +198,32 @@ EOF
192198
# None
193199
#######################################
194200
build_ios_dylib() {
195-
echo "Starting build for Leanplum-SDK (iOS)"
196-
201+
echo "Starting dylib build for Leanplum-SDK (iOS)"
197202
run "Building Leanplum-SDK (device/armv7) target ..." \
198203
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
199204
"$ACTION" ARCHS='armv7' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7_DIR}" \
200-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
205+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
206+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
201207
run "Building Leanplum-SDK (device/armv7s) target ..." \
202208
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
203209
"$ACTION" ARCHS='armv7s' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARMV7S_DIR}" \
204-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
210+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
211+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
205212
run "Building Leanplum-SDK (device/arm64) target ..." \
206213
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${DEVICE_SDK}" \
207214
"$ACTION" ARCHS='arm64' RUN_CLANG_STATIC_ANALYZER=NO BUILD_DIR="${BUILD_DIR}${ARM64_DIR}" \
208-
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
215+
BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
216+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
209217
run "Building Leanplum-SDK (simulator/i386) target ..." \
210218
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
211219
"$ACTION" ARCHS='i386' VALID_ARCHS='i386' RUN_CLANG_STATIC_ANALYZER=NO \
212-
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
220+
BUILD_DIR="${BUILD_DIR}${X86_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
221+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
213222
run "Building Leanplum-SDK (simulator/x86_64) target ..." \
214223
xcodebuild -configuration "${CONFIGURATION}" -target "Leanplum-iOS-SDK-source-iOS" -sdk "${SIM_SDK}" \
215224
"$ACTION" ARCHS='x86_64' VALID_ARCHS='x86_64' RUN_CLANG_STATIC_ANALYZER=NO \
216-
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode"
225+
BUILD_DIR="${BUILD_DIR}${X8664_DIR}" BUILD_ROOT="${BUILD_ROOT}" OTHER_CFLAGS="-fembed-bitcode" \
226+
GCC_PREPROCESSOR_DEFINITIONS="PACKAGE_IDENTIFIER=${LEANPLUM_PACKAGE_IDENTIFIER}"
217227

218228
run "Combining builds to universal fat library ..." \
219229
lipo -create -output "${RELEASE_DIR}/Leanplum" \
@@ -244,7 +254,7 @@ build_ios_dylib() {
244254
rm -rf "${RELEASE_DIR}/Leanplum.framework/_CodeSignature"
245255
# Update modulemap with correct import, since umbrella header is not generated by cocoapods with
246256
# a custom module_name set.
247-
sed -i "" -e "s/Leanplum-iOS-SDK-source-iOS-umbrella.h/Leanplum.h/g" \
257+
sed -i "" -e "s/Leanplum-iOS-SDK-source-umbrella.h/Leanplum.h/g" \
248258
"${RELEASE_DIR}/Leanplum.framework/modules/module.modulemap"
249259

250260
printf "%s\n" "Successfully built Leanplum-SDK (iOS) Framework.\n"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--- a/AppleSDK/Leanplum-SDK/Leanplum-SDK/Classes/LPMessageTemplates.h
2+
+++ b/AppleSDK/Leanplum-SDK/Leanplum-SDK/Classes/LPMessageTemplates.h
3+
@@ -29,7 +29,11 @@
4+
// That's it!
5+
6+
#import <Foundation/Foundation.h>
7+
-#import "Leanplum.h"
8+
+#import "Leanplum/Leanplum.h"
9+
+
10+
+#ifndef LPMessageTemplatesClass
11+
+#define LPMessageTemplatesClass LPMessageTemplates
12+
+#endif
13+
14+
@interface LPMessageTemplatesClass : NSObject
15+
#if LP_NOT_TV

0 commit comments

Comments
 (0)