Skip to content

Commit

Permalink
Updating Braze SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
hokstuff committed Sep 21, 2020
1 parent 42e0381 commit 0e1e249
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 36 deletions.
10 changes: 5 additions & 5 deletions Appboy-iOS-SDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Appboy-iOS-SDK"
s.version = "3.27.0"
s.version = "3.28.0"
s.summary = "This is the Braze iOS SDK for Mobile Marketing Automation"
s.homepage = "http://www.braze.com"
s.license = { :type => 'Commercial', :text => 'Please refer to https://github.com/Appboy/appboy-ios-sdk/blob/master/LICENSE'}
Expand All @@ -26,7 +26,7 @@ Pod::Spec.new do |s|
s.subspec 'Core' do |sc|
sc.ios.library = 'z'
sc.frameworks = 'SystemConfiguration', 'QuartzCore', 'CoreText', 'WebKit'
sc.source_files = 'AppboyKit/headers/AppboyKitLibrary/*.h', 'AppboyKit/ABKIdentifierForAdvertisingProvider.m', 'AppboyKit/ABKModalWebViewController.m', 'AppboyKit/ABKNoConnectionLocalization.m', 'AppboyKit/ABKLocationManagerProvider.m'
sc.source_files = 'AppboyKit/headers/AppboyKitLibrary/*.h', 'AppboyKit/ABKModalWebViewController.m', 'AppboyKit/ABKNoConnectionLocalization.m', 'AppboyKit/ABKLocationManagerProvider.m'
sc.resource = 'AppboyKit/Appboy.bundle'
sc.vendored_libraries = 'AppboyKit/libAppboyKitLibrary.a'
sc.weak_framework = 'CoreTelephony', 'Social', 'Accounts', 'AdSupport', 'UserNotifications'
Expand All @@ -43,20 +43,20 @@ Pod::Spec.new do |s|
snf.source_files = 'AppboyUI/ABKNewsFeed/*.*', 'AppboyUI/ABKNewsFeed/ViewControllers/**/*.*', 'AppboyUI/ABKUIUtils/**/*.*', 'AppboyKit/ABKSDWebImageProxy.m'
snf.resource = 'AppboyUI/ABKNewsFeed/Resources/**/*.*'
snf.dependency 'Appboy-iOS-SDK/Core'
snf.dependency 'SDWebImage', '~>5.8.2'
snf.dependency 'SDWebImage', '>= 5.8.2', '< 6'
end

s.subspec 'InAppMessage' do |siam|
siam.source_files = 'AppboyUI/ABKUIUtils/**/*.*', 'AppboyUI/ABKInAppMessage/*.*', 'AppboyUI/ABKInAppMessage/ViewControllers/*.*', 'AppboyKit/ABKSDWebImageProxy.m'
siam.resource = 'AppboyUI/ABKInAppMessage/Resources/*.*'
siam.dependency 'Appboy-iOS-SDK/Core'
siam.dependency 'SDWebImage', '~>5.8.2'
siam.dependency 'SDWebImage', '>= 5.8.2', '< 6'
end

s.subspec 'ContentCards' do |scc|
scc.source_files = 'AppboyUI/ABKContentCards/*.*', 'AppboyUI/ABKContentCards/ViewControllers/**/*.*', 'AppboyUI/ABKUIUtils/**/*.*', 'AppboyKit/ABKSDWebImageProxy.m'
scc.resource = 'AppboyUI/ABKContentCards/Resources/**/*.*'
scc.dependency 'Appboy-iOS-SDK/Core'
scc.dependency 'SDWebImage', '~>5.8.2'
scc.dependency 'SDWebImage', '>= 5.8.2', '< 6'
end
end
4 changes: 3 additions & 1 deletion AppboyKit/headers/AppboyKitLibrary/ABKURLDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ typedef NS_ENUM(NSInteger, ABKChannel) {
* This delegate method is fired whenever the user attempts to open a URL sent by Braze. You can use this delegate
* to customize Braze's URL handling.
*/
- (BOOL)handleAppboyURL:(NSURL *)url fromChannel:(ABKChannel)channel withExtras:(NSDictionary *)extras;
- (BOOL)handleAppboyURL:(NSURL * _Nullable)url
fromChannel:(ABKChannel)channel
withExtras:(NSDictionary * _Nullable)extras;

@end
NS_ASSUME_NONNULL_END
17 changes: 1 addition & 16 deletions AppboyKit/headers/AppboyKitLibrary/Appboy.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import <UserNotifications/UserNotifications.h>

#ifndef APPBOY_SDK_VERSION
#define APPBOY_SDK_VERSION @"3.27.0"
#define APPBOY_SDK_VERSION @"3.28.0"
#endif

#if !TARGET_OS_TV
Expand Down Expand Up @@ -491,21 +491,6 @@ typedef NS_OPTIONS(NSUInteger, ABKDeviceOptions) {


#if !TARGET_OS_TV
/*!
* @param response The response passed in from userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:.
*
* @discussion This method returns whether or not a UNNotification was sent from Braze servers.
*/
- (BOOL)userNotificationWasSentFromAppboy:(UNNotificationResponse *)response __deprecated_msg("Use [ABKPushUtils isAppboyUserNotification:] instead.") NS_AVAILABLE_IOS(10.0);

/*!
* @param options The NSDictionary you get from application:didFinishLaunchingWithOptions or
* application:didReceiveRemoteNotification in your App Delegate.
*
* @discussion
* Test a push notification to see if it came Braze.
*/
- (BOOL)pushNotificationWasSentFromAppboy:(NSDictionary *)options __deprecated_msg("Use [ABKPushUtils isAppboyRemoteNotification:] instead.");

/*!
* @param deviceToken The device's push token.
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## 3.28.0

##### Breaking
- Removes `userNotificationWasSentFromAppboy:` and `pushNotificationWasSentFromAppboy:` on `Appboy`. Use `isAppboyUserNotification:` and `isAppboyRemoteNotification:` in `ABKPushUtils` instead.
- Updates `ABKURLDelegate`'s method signature for `handleAppboyURL:fromChannel:withExtras:` to include nullability annotations required for proper Swift support.

##### Fixed
- Fixes a race condition in `Appboy` method `wipeDataAndDisableForAppRun` where certain persisted fields would still be available immediately after calling the method. These fields now are removed synchronously.

##### Changed
- Updated SDWebImage to use version 5.9.x.

## 3.27.0

##### Breaking
Expand Down
2 changes: 1 addition & 1 deletion Example/Stopwatch/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.27.0</string>
<string>3.28.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 0 additions & 2 deletions HelloSwift/HelloSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
C06D5DDF1ED367C200087F72 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C1E6FB321D835D230084F8CE /* HelloSwift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HelloSwift.entitlements; sourceTree = "<group>"; };
C1E6FB331D835D5C0084F8CE /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; };
C1E6FB371D83671A0084F8CE /* AirshipKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AirshipKit.framework; path = ../../../../Downloads/Carthage/Build/iOS/AirshipKit.framework; sourceTree = "<group>"; };
CA3221C7D1BB492DAD146EE9 /* Pods-HelloSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloSwift.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloSwift/Pods-HelloSwift.release.xcconfig"; sourceTree = "<group>"; };
D16084DD3DE533703D4D40BB /* Pods-HelloSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloSwift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-HelloSwift/Pods-HelloSwift.debug.xcconfig"; sourceTree = "<group>"; };
FD2DEB2A95BEB5EA28A525D0 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -267,7 +266,6 @@
isa = PBXGroup;
children = (
132CC5AF23760367007F3576 /* AppboyPushStory.framework */,
C1E6FB371D83671A0084F8CE /* AirshipKit.framework */,
C1E6FB331D835D5C0084F8CE /* NotificationCenter.framework */,
446901049F7C1F60144D6DC2 /* Pods.framework */,
0174F70FAE31265EA00C5A40 /* Pods_HelloSwift.framework */,
Expand Down
12 changes: 6 additions & 6 deletions HelloSwift/HelloSwift/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
}
}

func handleAppboyURL(_ url: URL, from channel: ABKChannel, withExtras extras: [AnyHashable : Any]) -> Bool {
if (url.host == "sweeney.appboy.com") {
NSLog("Received link with host sweeney.appboy.com.")
return true;
func handleAppboyURL(_ url: URL?, from channel: ABKChannel, withExtras extras: [AnyHashable : Any]?) -> Bool {
guard let url = url, url.host == "sweeney.appboy.com" else {
// Let Braze handle links otherwise
return false
}
// Let Braze handle links otherwise
return false;
NSLog("Received link with host sweeney.appboy.com.")
return true;
}
}
14 changes: 12 additions & 2 deletions HelloSwift/HelloSwift/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="B2b-IW-ogs">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.2" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="B2b-IW-ogs">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand Down Expand Up @@ -101,6 +101,14 @@
<segment title="Navigation"/>
</segments>
</segmentedControl>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IRI-jF-kbd">
<rect key="frame" x="145" y="468" width="86" height="33"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="News Feed"/>
<connections>
<action selector="newsFeedButtonTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Oqu-TM-X0a"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
Expand All @@ -123,7 +131,9 @@
<constraint firstItem="8Fo-Tc-mkG" firstAttribute="top" secondItem="VXY-50-8l3" secondAttribute="bottom" constant="10" id="oGW-0I-cFm"/>
<constraint firstItem="VXY-50-8l3" firstAttribute="top" secondItem="y3c-jy-aDJ" secondAttribute="bottom" constant="15" id="p6J-Dc-kZg"/>
<constraint firstItem="VXY-50-8l3" firstAttribute="leading" secondItem="8bC-Xf-vdC" secondAttribute="leading" constant="20" id="pCc-Xr-5GE"/>
<constraint firstItem="IRI-jF-kbd" firstAttribute="centerX" secondItem="qYV-XB-kwJ" secondAttribute="centerX" id="vcd-Xn-vEV"/>
<constraint firstItem="7WZ-ry-KG3" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="vqQ-x3-FHK"/>
<constraint firstItem="qYV-XB-kwJ" firstAttribute="top" secondItem="IRI-jF-kbd" secondAttribute="bottom" constant="11" id="wb2-gx-3gr"/>
<constraint firstItem="dKu-zb-hIz" firstAttribute="leading" secondItem="VXY-50-8l3" secondAttribute="leading" id="xlH-U1-sdH"/>
</constraints>
</view>
Expand Down
6 changes: 6 additions & 0 deletions HelloSwift/HelloSwift/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ class ViewController: UIViewController {
Appboy.sharedInstance()?.changeUser(userIdTextField.text!)
}

@IBAction func newsFeedButtonTapped(_ sender: Any) {
let newsFeed = ABKNewsFeedViewController()
newsFeed.newsFeed.navigationItem.title = "News Feed"
self.navigationController?.present(newsFeed, animated: true, completion: nil)
}

@IBAction func contentCardButtonTapped(_ sender: Any) {
if modalOrNavigationPicker.selectedSegmentIndex == 0 {
let contentCards = ABKContentCardsViewController();
Expand Down
Loading

0 comments on commit 0e1e249

Please sign in to comment.