Commit aa17aff 1 parent 492c510 commit aa17aff Copy full SHA for aa17aff
File tree 5 files changed +41
-3
lines changed
5 files changed +41
-3
lines changed Original file line number Diff line number Diff line change 3575
3575
BITCODE_GENERATION_MODE = bitcode;
3576
3576
CODE_SIGN_IDENTITY = "";
3577
3577
ENABLE_BITCODE = YES;
3578
- MARKETING_VERSION = 5.0.3 ;
3578
+ MARKETING_VERSION = 5.1.0 ;
3579
3579
OTHER_LDFLAGS = (
3580
3580
"$(inherited)",
3581
3581
"-ObjC",
3593
3593
BITCODE_GENERATION_MODE = bitcode;
3594
3594
CODE_SIGN_IDENTITY = "";
3595
3595
ENABLE_BITCODE = YES;
3596
- MARKETING_VERSION = 5.0.3 ;
3596
+ MARKETING_VERSION = 5.1.0 ;
3597
3597
OTHER_LDFLAGS = (
3598
3598
"$(inherited)",
3599
3599
"-ObjC",
Original file line number Diff line number Diff line change @@ -121,6 +121,19 @@ NS_ASSUME_NONNULL_BEGIN
121
121
*/
122
122
- (BOOL )application : (UIApplication *)application openURL : (NSURL *)url options : (NSDictionary *)options ;
123
123
124
+ /* *
125
+ * Finish the `SFSafariViewController` authentication loop. This method should
126
+ * be called from scene:openURLContexts inside the scene delegate.
127
+ *
128
+ * This method will verify an authentication token sent by the Twitter API to
129
+ * finish the web-based authentication flow.
130
+ *
131
+ * @param scene The scene that UIKit asks to open the URL.
132
+ * @param URLContexts One or more UIOpenURLContext objects. Each object contains one URL to open and any additional information needed to open that URL.
133
+ *
134
+ */
135
+ - (void )scene : (UIScene *)scene openURLContexts : (nonnull NSSet <UIOpenURLContext *> *)URLContexts API_AVAILABLE(ios(13.0 ));
136
+
124
137
@end
125
138
126
139
NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change @@ -401,6 +401,29 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(N
401
401
return NO ;
402
402
}
403
403
404
+ - (void )scene : (UIScene *)scene openURLContexts : (nonnull NSSet <UIOpenURLContext *> *)URLContexts API_AVAILABLE(ios(13.0 )) {
405
+ for (UIOpenURLContext *context in URLContexts) {
406
+ NSURL *url = context.URL ;
407
+ NSString *sourceApplication = context.options .sourceApplication ;
408
+ BOOL isSSOBundle = sourceApplication == nil ? [self .mobileSSO isSSOWithURL: url] : [self .mobileSSO isSSOWithSourceApplication: sourceApplication];
409
+ BOOL isWeb = sourceApplication == nil ? [self .mobileSSO isWebWithURL: url] : [self .mobileSSO isWebWithSourceApplication: sourceApplication];
410
+
411
+ if (isSSOBundle) {
412
+ [self .mobileSSO processRedirectURL: url];
413
+ return ;
414
+ } else if (isWeb) {
415
+ BOOL isTokenValid = [self .mobileSSO verifyOauthTokenResponsefromURL: url];
416
+ if (isTokenValid) {
417
+ // If it wasn't a Mobile SSO redirect, try to handle as
418
+ // SFSafariViewController redirect
419
+ [self .webAuthenticationFlow resumeAuthenticationWithRedirectURL: url];
420
+ return ;
421
+ }
422
+ }
423
+ }
424
+ [self .mobileSSO triggerInvalidSourceError ];
425
+ }
426
+
404
427
#pragma mark - TwitterCore
405
428
406
429
- (NSURL *)applicationDocumentsDirectory
Original file line number Diff line number Diff line change 1
1
Pod ::Spec . new do |s |
2
2
s . name = "TwitterKit5"
3
- s . version = "5.0.3 "
3
+ s . version = "5.1.0 "
4
4
s . summary = "Increase user engagement and app growth."
5
5
s . homepage = "https://github.com/touren/twitter-kit-ios"
6
6
s . documentation_url = "https://github.com/touren/twitter-kit-ios/wiki"
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ set -e
4
+
3
5
# # Build TwitterKit.framework - x86_64
4
6
xcodebuild \
5
7
-project TwitterKit/TwitterKit.xcodeproj \
You can’t perform that action at this time.
0 commit comments