diff --git a/Apptentive/Apptentive/Apptentive.h b/Apptentive/Apptentive.h similarity index 75% rename from Apptentive/Apptentive/Apptentive.h rename to Apptentive/Apptentive.h index 2ddc18c81..7f7e5aa4c 100644 --- a/Apptentive/Apptentive/Apptentive.h +++ b/Apptentive/Apptentive.h @@ -9,12 +9,7 @@ #ifndef Apptentive_h #define Apptentive_h -#ifdef NO_USE_FRAMEWORKS -#import -#import -#else #import #import -#endif #endif /* Apptentive_h */ diff --git a/Apptentive/Apptentive.modulemap b/Apptentive/Apptentive.modulemap new file mode 100644 index 000000000..076c97b64 --- /dev/null +++ b/Apptentive/Apptentive.modulemap @@ -0,0 +1,6 @@ +framework module Apptentive { + umbrella header "Apptentive.h" + + export * + module * { export * } +} diff --git a/Apptentive/Apptentive.xcodeproj/project.pbxproj b/Apptentive/Apptentive.xcodeproj/project.pbxproj index 607e0b45f..718b24c4a 100644 --- a/Apptentive/Apptentive.xcodeproj/project.pbxproj +++ b/Apptentive/Apptentive.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ 01201AD31FC637BE00EB3593 /* CodePointAndInteractionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 01201AD21FC637BD00EB3593 /* CodePointAndInteractionTests.m */; }; 01216C501EBBB53E0062BD0D /* RequestTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01216C4F1EBBB53E0062BD0D /* RequestTests.swift */; }; 0123005F20531698000EC3C3 /* ClauseTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 0123005E20531698000EC3C3 /* ClauseTests.m */; }; - 012B96C325118349008A56CC /* Apptentive.h in Headers */ = {isa = PBXBuildFile; fileRef = 012B96C22511832D008A56CC /* Apptentive.h */; }; + 012B96C325118349008A56CC /* Apptentive.h in Headers */ = {isa = PBXBuildFile; fileRef = 012B96C22511832D008A56CC /* Apptentive.h */; settings = {ATTRIBUTES = (Public, ); }; }; 012ED9292072F33F003D87F3 /* ApptentiveRetryPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 012ED9272072F33F003D87F3 /* ApptentiveRetryPolicy.h */; }; 012ED92A2072F33F003D87F3 /* ApptentiveRetryPolicy.m in Sources */ = {isa = PBXBuildFile; fileRef = 012ED9282072F33F003D87F3 /* ApptentiveRetryPolicy.m */; }; 012ED92C2072FABE003D87F3 /* RetryPolicyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012ED92B2072FABE003D87F3 /* RetryPolicyTests.swift */; }; @@ -840,6 +840,7 @@ 01B9055A2411C83600E2A663 /* ApptentiveArchiver.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ApptentiveArchiver.m; sourceTree = ""; }; 01B9057C2416C52B00E2A663 /* ApptentiveURLOpener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ApptentiveURLOpener.h; sourceTree = ""; }; 01B9057D2416C52B00E2A663 /* ApptentiveURLOpener.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ApptentiveURLOpener.m; sourceTree = ""; }; + 01BEA06D2511E97500DF982D /* Apptentive.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = Apptentive.modulemap; sourceTree = ""; }; 01E04F9C1E819CD300D7E849 /* ApptentiveMessageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveMessageManager.h; sourceTree = ""; }; 01E04F9D1E819CD300D7E849 /* ApptentiveMessageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApptentiveMessageManager.m; sourceTree = ""; }; 01E8E2341E6E096D00786738 /* ApptentiveInteractionAppleRatingDialogController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApptentiveInteractionAppleRatingDialogController.h; sourceTree = ""; }; @@ -999,6 +1000,8 @@ 01A2CF871E49062700C2103A = { isa = PBXGroup; children = ( + 01BEA06D2511E97500DF982D /* Apptentive.modulemap */, + 012B96C22511832D008A56CC /* Apptentive.h */, 01A2CF931E49062700C2103A /* Apptentive */, 01A2CF9E1E49062800C2103A /* ApptentiveTests */, 01A2CF921E49062700C2103A /* Products */, @@ -1018,7 +1021,6 @@ 01A2CF931E49062700C2103A /* Apptentive */ = { isa = PBXGroup; children = ( - 012B96C22511832D008A56CC /* Apptentive.h */, 0168B1AC24AAAFD1006EEF65 /* DebugLogging.cer */, EF3FE88720A226EE00A3C9C5 /* Apptimize */, 01A2CFB01E490A9700C2103A /* Custom Views */, @@ -2386,7 +2388,6 @@ 01A2CFA31E49062800C2103A /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -2416,7 +2417,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -2445,7 +2446,6 @@ 01A2CFA41E49062800C2103A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; @@ -2475,7 +2475,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 45; + CURRENT_PROJECT_VERSION = 46; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; @@ -2507,13 +2507,14 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 86WML2UN43; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 45; + DYLIB_CURRENT_VERSION = 46; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch"; GCC_PREPROCESSOR_DEFINITIONS = "APPTENTIVE_DEBUG=1"; INFOPLIST_FILE = Apptentive/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = $SRCROOT/Apptentive.modulemap; PRODUCT_BUNDLE_IDENTIFIER = com.apptentive.Apptentive; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; @@ -2527,12 +2528,13 @@ DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 86WML2UN43; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 45; + DYLIB_CURRENT_VERSION = 46; DYLIB_INSTALL_NAME_BASE = "@rpath"; GCC_PREFIX_HEADER = "Apptentive/Misc/ApptentiveConnect-Prefix.pch"; INFOPLIST_FILE = Apptentive/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = $SRCROOT/Apptentive.modulemap; PRODUCT_BUNDLE_IDENTIFIER = com.apptentive.Apptentive; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; diff --git a/Apptentive/Apptentive/ApptentiveMain.h b/Apptentive/Apptentive/ApptentiveMain.h index b352261e6..dc1a6e280 100644 --- a/Apptentive/Apptentive/ApptentiveMain.h +++ b/Apptentive/Apptentive/ApptentiveMain.h @@ -20,7 +20,7 @@ FOUNDATION_EXPORT double ApptentiveVersionNumber; FOUNDATION_EXPORT const unsigned char ApptentiveVersionString[]; /** The version number of the Apptentive SDK. */ -#define kApptentiveVersionString @"5.3.0" +#define kApptentiveVersionString @"5.3.1" /** The version number of the Apptentive API platform. */ #define kApptentiveAPIVersionString @"9" diff --git a/Apptentive/Apptentive/ApptentiveStyleSheet.h b/Apptentive/Apptentive/ApptentiveStyleSheet.h index b786f98c5..8e701c416 100644 --- a/Apptentive/Apptentive/ApptentiveStyleSheet.h +++ b/Apptentive/Apptentive/ApptentiveStyleSheet.h @@ -6,7 +6,6 @@ // Copyright © 2016 Apptentive, Inc. All rights reserved. // -#import "Apptentive.h" #import NS_ASSUME_NONNULL_BEGIN diff --git a/Apptentive/Apptentive/Info.plist b/Apptentive/Apptentive/Info.plist index e6bae41f4..009e2f9ae 100644 --- a/Apptentive/Apptentive/Info.plist +++ b/Apptentive/Apptentive/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.3.0 + 5.3.1 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Apptentive/ApptentiveTests/Info.plist b/Apptentive/ApptentiveTests/Info.plist index 0b2a849d3..3e5c1decc 100644 --- a/Apptentive/ApptentiveTests/Info.plist +++ b/Apptentive/ApptentiveTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 5.3.0 + 5.3.1 CFBundleVersion 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 12b1c8c2e..b97fe7680 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +# 2020-09-16 - v5.3.1 + +#### Improvements + +* SDK framework now ships as an xcframework that includes simulator and device architectures +* SDK framework now includes a module map for easier imports + +#### Bugs Fixed + +* Fix issue with framework header imports + # 2020-09-15 - v5.3.0 Version 5.3 adds support for iOS 14 and drops support for iOS versions prior to 10.3. diff --git a/Example/Podfile.lock b/Example/Podfile.lock index b222f15bc..50dc279dc 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - apptentive-ios (5.3.0) + - apptentive-ios (5.3.1) DEPENDENCIES: - apptentive-ios (from `..`) @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: ".." SPEC CHECKSUMS: - apptentive-ios: 9f78b6a860afc3a64ff992bfa7a7a19897eb099b + apptentive-ios: 94a2e90b4759051a3b73e6e2ae85f16361e20b9c PODFILE CHECKSUM: 785a9d76c0ca2535819b754c6fe8c5c6413dbc30 diff --git a/apptentive-ios.podspec b/apptentive-ios.podspec index 53310cb2d..fbd3aa384 100644 --- a/apptentive-ios.podspec +++ b/apptentive-ios.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'apptentive-ios' s.module_name = 'Apptentive' - s.version = '5.3.0' + s.version = '5.3.1' s.license = 'BSD' s.summary = 'Apptentive Customer Communications SDK.' s.homepage = 'https://www.apptentive.com/' @@ -22,5 +22,5 @@ Pod::Spec.new do |s| s.prefix_header_contents = '#import "ApptentiveLog.h"', '#import "ApptentiveAssert.h"', '#import "ApptentiveSafeCollections.h"' s.pod_target_xcconfig = { "GCC_PREPROCESSOR_DEFINITIONS[config=Debug]" => "APPTENTIVE_DEBUG=1 APPTENTIVE_COCOAPODS=1", "GCC_PREPROCESSOR_DEFINITIONS[config=Release]" => "APPTENTIVE_COCOAPODS=1" } - s.public_header_files = 'Apptentive/Apptentive/Apptentive.h', 'Apptentive/Apptentive/ApptentiveMain.h', 'Apptentive/Apptentive/ApptentiveStyleSheet.h' + s.public_header_files = 'Apptentive/Apptentive/ApptentiveMain.h', 'Apptentive/Apptentive/ApptentiveStyleSheet.h' end diff --git a/etc/bin/build_framework.sh b/etc/bin/build_framework.sh index 3584c84ca..cea13d9e4 100755 --- a/etc/bin/build_framework.sh +++ b/etc/bin/build_framework.sh @@ -15,21 +15,19 @@ BUILD_DIR="/tmp/apptentive_framework_build" PROJECT_DIR="Apptentive" OUTPUT_DIR="${BUILD_DIR}/${FRAMEWORK_NAME}-${CONFIGURATION}-iphoneuniversal/" -SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework" +SIMULATOR_ARCHIVE_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.xcarchive" -DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework" +DEVICE_ARCHIVE_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.xcarchive" UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal" -FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework" - ###################### # Build Frameworks ###################### -xcodebuild -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj -scheme ${FRAMEWORK_NAME} -sdk iphonesimulator -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator ENABLE_BITCODE=YES OTHER_CFLAGS='-fembed-bitcode' GCC_PREPROCESSOR_DEFINITIONS='APPTENTIVE_FRAMEWORK=1' 2>&1 +xcodebuild archive -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj -scheme ${FRAMEWORK_NAME} -destination="iOS Simulator" -archivePath "${SIMULATOR_ARCHIVE_PATH}" -sdk iphonesimulator SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES -xcodebuild -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj -scheme ${FRAMEWORK_NAME} -sdk iphoneos -configuration ${CONFIGURATION} clean archive CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos ENABLE_BITCODE=YES OTHER_CFLAGS='-fembed-bitcode' GCC_PREPROCESSOR_DEFINITIONS='APPTENTIVE_FRAMEWORK=1' 2>&1 +xcodebuild archive -project ${PROJECT_DIR}/${PROJECT_NAME}.xcodeproj -scheme ${FRAMEWORK_NAME} -destination="iOS" -archivePath "${DEVICE_ARCHIVE_PATH}" -sdk iphoneos SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES ###################### # Create directory for universal @@ -39,19 +37,11 @@ rm -rf "${UNIVERSAL_LIBRARY_DIR}" mkdir "${UNIVERSAL_LIBRARY_DIR}" -mkdir "${FRAMEWORK}" - -###################### -# Copy files Framework -###################### - -cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}" - ###################### -# Make an universal binary +# Make an xcframework ###################### -lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}" "${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}" -create -output "${FRAMEWORK}/${FRAMEWORK_NAME}" | echo +xcodebuild -create-xcframework -framework "${SIMULATOR_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework" -framework "${DEVICE_ARCHIVE_PATH}/Products/Library/Frameworks/${FRAMEWORK_NAME}.framework" -output "${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.xcframework" | echo ###################### # On Release, copy the result to release directory @@ -60,12 +50,12 @@ lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}" "${DEVICE_LIBRARY_PATH}/${FRA rm -rf "$OUTPUT_DIR" mkdir -p "$OUTPUT_DIR" -cp -r "${FRAMEWORK}" "$OUTPUT_DIR" +cp -r "${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.xcframework" "$OUTPUT_DIR" cp "$PROJECT_DIR/../LICENSE.TXT" "$OUTPUT_DIR" cp "$PROJECT_DIR/../README.md" "$OUTPUT_DIR" cp "$PROJECT_DIR/../CHANGELOG.md" "$OUTPUT_DIR" -VERSION=`cat Apptentive/Apptentive/Apptentive.h | sed -n -e 's/#define kApptentiveVersionString @"\([^"]*\)"/\1/p'` +VERSION=`cat Apptentive/Apptentive/ApptentiveMain.h | sed -n -e 's/#define kApptentiveVersionString @"\([^"]*\)"/\1/p'` pushd "$OUTPUT_DIR" tar -zcv -f "../apptentive_ios_framework-$VERSION.tar.gz" .