File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/ios/dependencies/Branch-SDK Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ - (void)showShareSheetWithLinkProperties:(BranchLinkProperties *)linkProperties
184
184
UIActivityItemProvider *itemProvider = [self getBranchActivityItemWithLinkProperties: linkProperties];
185
185
NSMutableArray *items = [NSMutableArray arrayWithObject: itemProvider];
186
186
if (shareText) {
187
- [items insertObject: shareText atIndex: 0 ];
187
+ [items insertObject: [ shareText valueForKey: @" shareText " ] atIndex: 0 ];
188
188
}
189
189
UIActivityViewController *shareViewController = [[UIActivityViewController alloc ] initWithActivityItems: items applicationActivities: nil ];
190
190
@@ -224,6 +224,13 @@ - (void)showShareSheetWithLinkProperties:(BranchLinkProperties *)linkProperties
224
224
@catch (NSException *exception) {
225
225
[_preferenceHelper logWarning: @" Unable to setValue 'emailSubject' forKey 'subject' on UIActivityViewController." ];
226
226
}
227
+ } else if ([shareText valueForKey: @" shareTitle" ] != nil ) {
228
+ @try {
229
+ [shareViewController setValue: [shareText valueForKey: @" shareTitle" ] forKey: @" subject" ];
230
+ }
231
+ @catch (NSException *exception) {
232
+ [_preferenceHelper logWarning: @" Unable to setValue 'emailSubject' forKey 'subject' on UIActivityViewController as shareTitle is missing" ];
233
+ }
227
234
}
228
235
229
236
if (presentingViewController) {
You can’t perform that action at this time.
0 commit comments