Skip to content

Commit c566449

Browse files
Merge pull request #11 from Iterable/feature/itbl-5387-docs
[ITBL-5387]-docs
2 parents 467baf7 + c455e69 commit c566449

File tree

12 files changed

+371
-49
lines changed

12 files changed

+371
-49
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Pods/
88
*.xccheckout
99
.idea/
1010

11-
scripts/
12-
1311
dev.config
1412

1513
Build/

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
Contributions (in the form of issues or pull requests) are welcome!
3+
4+
#### **Bugs**
5+
* Please make sure the bug hasn't already been reported.
6+
* If it hasn't, open a new issue. Please provide as much detail about the bug as possible.
7+
8+
#### **Feature Suggestions**
9+
* Feel free to open issues for enhancements and new features!
10+
* But like with bugs, please make sure it hasn't already been suggested.
11+
12+
#### **Pull Requests**
13+
* If you have a patch for a bug, or an implementation of a new feature, you're more than welcome to submit a pull request!
14+
* If the pull request is for an outstanding issue, please include a link to that issue. Otherwise, there's no need to create a new issue; simply explain the purpose of the Pull Request in the body.
15+
16+
Thanks,
17+
Team Iterable

README.md

Lines changed: 292 additions & 40 deletions
Large diffs are not rendered by default.
20.4 KB
Loading

images/build-setting.png

11 KB
Loading

images/embedded-binaries.png

37.7 KB
Loading

sample-apps/objc-sample-app/objc-sample-app/AppDelegate.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ - (void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNot
100100
}
101101

102102
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)(void))completionHandler {
103-
[IterableAppIntegration userNotificationCenter:center didReceive:response withCompletionHandler:completionHandler];
103+
[IterableAppIntegration userNotificationCenter:center didReceiveNotificationResponse:response withCompletionHandler:completionHandler];
104104
}
105105

106106
#pragma mark - IterableURLDelegate

sample-apps/swift-sample-app/Podfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ platform :ios, '11.0'
44
use_frameworks!
55

66
target 'swift-sample-app' do
7-
pod 'Iterable-iOS-SDK', :path => '../../../swift-sdk'
7+
pod 'Iterable-iOS-SDK'
88
end
99

1010
target 'swift-sample-app-notification-extension' do
11-
pod 'Iterable-iOS-AppExtensions', :path => '../../../swift-sdk'
11+
pod 'Iterable-iOS-AppExtensions'
1212
end
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
3+
print_usage() {
4+
echo Usage `basename $0` target_name module_name
5+
exit 1
6+
}
7+
8+
if [ "$1" == "" ] || [ "$2" == "" ]; then
9+
print_usage
10+
fi
11+
12+
TARGET="$1"
13+
MODULE_NAME="$2"
14+
BUILD_DIR=build
15+
CONFIGURATION=Release
16+
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
17+
18+
# make sure the output directory exists
19+
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
20+
21+
# Step 1. Build Device and Simulator versions
22+
xcodebuild -target "${TARGET}" ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_DIR}" clean build
23+
xcodebuild -target "${TARGET}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_DIR}" clean build
24+
25+
# Step 2. Copy the framework structure (from iphoneos build) to the universal folder
26+
cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${MODULE_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"
27+
28+
# Step 3. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory
29+
SIMULATOR_SWIFT_MODULES_DIR="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${MODULE_NAME}.framework/Modules/${MODULE_NAME}.swiftmodule/."
30+
if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then
31+
cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "${UNIVERSAL_OUTPUTFOLDER}/${MODULE_NAME}.framework/Modules/${MODULE_NAME}.swiftmodule"
32+
fi
33+
34+
# Step 4. Create universal binary file using lipo and place the combined executable in the copied framework directory
35+
lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${MODULE_NAME}.framework/${MODULE_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${MODULE_NAME}.framework/${MODULE_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${MODULE_NAME}.framework/${MODULE_NAME}"
36+
37+
# Step 5. Convenience step to copy the framework to the build directory
38+
cp -R "${UNIVERSAL_OUTPUTFOLDER}/${MODULE_NAME}.framework" "${BUILD_DIR}"

scripts/generate-zips.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
BUILDER=`dirname $0`/build-target-module-framework.sh
4+
BUILD_DIR=build
5+
6+
# clean build dir
7+
rm -rf "${BUILD_DIR}"
8+
9+
# generate the framework files
10+
"${BUILDER}" "swift-sdk" "IterableSDK"
11+
"${BUILDER}" "notification-extension" "IterableAppExtensions"
12+
13+
# generate archive
14+
cd "${BUILD_DIR}"
15+
zip -r IterableSDK.zip IterableSDK.framework
16+
zip -r IterableAppExtensions.zip IterableAppExtensions.framework
17+

0 commit comments

Comments
 (0)