FBSDKGameRequestDialog error with landscape app - ios

in my project i call this function: (Facebook SDK for iOS version v4.1.0)
FBSDKGameRequestContent *gameRequestContent = [[FBSDKGameRequestContent alloc] init];
gameRequestContent.message = #"Choi thu nhe, hay lam day";
gameRequestContent.title = #"Monkey Junior";
gameRequestContent.to = friends;
dialog = [FBSDKGameRequestDialog showWithContent:gameRequestContent delegate:(id)self];
Image:
Our app is in landscape and the Facebook friend invite dialog is in portrait and the buttons Send and Cancel are located outside the screen.
Please help me.

This is a known issue with the FB SDK for iOS being tracked here.
This issue is seen in iOS 7.x so if it is blocking you then you can maybe at least test your functionality (if feasible) in iOS 8.x till the fix is released.

Related

Black screen when using ARGeoTrackingConfiguration on iOS 15.4?

I am trying to run this sample project from Apple that uses ARGeoTrackingConfiguration: https://developer.apple.com/documentation/arkit/content_anchors/tracking_geographic_locations_in_ar
This sample app is supposed to show an AR camera feed in the top part of the screen, and a map view in the lower part. However, I am not seeing the camera feed, it's just black.
I suspect this is something that changed in iOS 15.4, since my colleague was able to run the app successfully on a phone with iOS 15.3.1.
Some other details:
I am seeing this issue on an iPhone 12 Pro Max and an iPhone 13 mini.
Both these devices can support geotracking and are connected to the internet.
I am in a location that has geotracking support, according to these docs: https://developer.apple.com/documentation/arkit/argeotrackingconfiguration
I updated to iOS 15.4.1 but the issue is still occurring.
I tried updating to the iOS 15.5 beta 1 and the issue is still occurring.
Has anyone else noticed this issue? Am I doing something wrong? Is there a workaround?
I filed a radar ticket as well, just in case.
EDIT: I filed a TSI request for this issue, and I got back a response saying that there is no workaround for the issue. However, it looks like the bug has been fixed in iOS 15.5 beta 2.
// Class originalClass = NSClassFromString(#"NSXPCDecoder");
// Class swizzledClass = NSClassFromString(#"SwizzledDecoder");
// SEL originalSelector = #selector(_validateAllowedClass:forKey:allowingInvocations:);
// SEL swizzledSelector = #selector(__validateAllowedClass:forKey:allowingInvocations:);
#interface SwizzledDecoder : NSObject
- (void)__validateAllowedClass:(Class)arg1 forKey:(id)arg2 allowingInvocations:(bool)arg3;
#end
#implementation SwizzledDecoder
- (void)__validateAllowedClass:(Class)arg1 forKey:(id)arg2 allowingInvocations:(bool)arg3 {
if ([arg2 isEqualToString: #"collaborationData"]) {
return;
}
return [self __validateAllowedClass: arg1 forKey: arg2 allowingInvocations: arg3];
}
#end
https://developer.apple.com/forums/thread/703735?answerId=711909022#711909022
I could think of a few options to "fix" this using Private (Apple) APIs. This approach is not super terrible and at least would unblock you from testing on a 15.4.x device (I confirmed this works on Xcode 13.3.1 and iOS 15.4.1).
As far as whether or not Apple would approve #YOLO #FIDLAR code like this in an App Store review? I can't help you there.
The real fix (we can hope for) is the next version of Xcode ships with an SDK that builds and compiles with a retroactive fix for 15.4.x.
This issue has been fixed in iOS 15.5

Hand Off between iOS and Mac device is not working

I am implementing both iOS and Mac applications. I implemented Hand Off feature in both applications. When I test implementation it works well when:
start on iOS app and continue on iOS app
start on iOS app and continue on Mac app
But it doesn't work when I start on Mac app and want to continue on iOS app. Logically, the problem is when I create userActivity and becomeCurrent on Mac app. But the code for iOS and Mac is the same, so I don't know where the problem is.
// Create userActivity
_userActivity = [[NSUserActivity alloc] initWithActivityType:#"com.myapp.image"];
_userActivity.title = #"Image";
_userActivity.supportsContinuationStreams = YES;
_userActivity.delegate = self;
_userActivity.userInfo = #{
#"Key" : #"information from the other device",
#"URL" : #"http://www.apple.com"
};
[_userActivity becomeCurrent];
Thanks!
I submitted a bug report with ID: 41374510 with title: Handoff doesn't work from MacOS to iOS.
I tested it with the same code in reverse from iOS to MacOS and that worked great so I am assuming that it is a Apple's bug.

Failed to open Apple Pay sheet on iPhone 6

I want to make an example project that open an Apple Pay sheet when user clicks on the 'Pay with Apple Pay' button on my app.
I test my app on an iPhone 6 with iOs version 8.1 (which contains Apple Pay) and Xcode 6.1 GM. Both of them have not been officially released yet.
I followed the tutorial on this page. And this is my code for handling the on-click event of 'Pay with Apple Pay' button:
PKPaymentRequest *request = [PKPaymentRequest new];
// Must be configured in Apple Developer Member Center
// Doesn't seem like the functionality is there yet
request.merchantIdentifier = #"my.valid.merchant.identifier";
request.countryCode = #"US";
request.currencyCode = #"USD";
// Let's go!
// if (![PKPaymentAuthorizationViewController canMakePayments]) return;
PKPaymentAuthorizationViewController *authVC = [[PKPaymentAuthorizationViewController alloc] initWithPaymentRequest:request];
authVC.delegate = self;
[self presentViewController:authVC animated:YES completion:nil];
Clicking on the 'Pay with Apple Pay' button, I got this error:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present a nil modal view controller on target
When checking the PKPaymentAuthorizationViewController canMakePayments], it returns false.
I'm not sure about the reason of my error is of the iPhone's setting or my code.
Does someone have the experience with Apple Pay? Please help me. Thank you so much.
I test my app on an iPhone 6 with iOs version 8.1 (which contains Apple Pay)
No, the most recent beta (iOS 8.1 Beta 2) does not contain Apple Pay. There's obviously some stuff in there under the hood as they're working on it, but it's not intended to work for developers yet.
This is why [PKPaymentAuthorizationViewController canMakePayments] returns NO and authVC is nil. Apple Pay is also not available in Settings, nor is it mentioned in the release notes.

Cannot dismiss email sheet invoked from UIDocumentInteractionController in iOS 8

I've got a very simple test app which contains nothing but the following code, attached to a UIButton:
- (IBAction)buttonUp:(id)sender {
// Build file path
NSString* filePath = [[NSBundle mainBundle] pathForResource:#"testfile"
ofType:#"txt"];
NSURL *url = [NSURL fileURLWithPath:filePath];
m_interactionController = [UIDocumentInteractionController interactionControllerWithURL:url];
[m_interactionController presentOptionsMenuFromRect:CGRectMake(200, 200, 100, 100)
inView:[self view]
animated:YES];
}
This builds with no issues, and running under iOS 7 (on a 4th generation iPad: A1458), this code works fine.
The problem is that, in iOS 8 Beta 5, if the user selects "Mail" from the UIDocumentInteractionController, then the email sheet that is displayed can never be dismissed. Tapping Send does indeed send the mail, but the email sheet continues to be displayed. Tapping on Cancel and electing to either delete or save the draft has no effect.
The problem occurs when the test app is built using Xcode 5.1.1. However, if the app is built with the Xcode 6 GM, then problem does not occur, and the code works fine.
Is there anything wrong with the code above?
For us, the problem did not occur in the final released version of iOS 8.
I had posted it to Radar, and it was closed as a duplicate (with the status of the duplicate being "Open"), so presumably it was a bug in the prerelease versions of iOS 8.

twitter sharing using sharekit crashing in ios 5

Hi I'm trying to a share images using sharekit on twitter,from app. I have added a twitter icon and when clicked I call this function
-(void)shareTwitter
{
SHKItem *itemshare = [SHKItem image:imgView.image title:projectname];
[SHK setRootViewController:self.navigationController];
[SHKTwitter shareItem:itemshare];
}
after this function is executed the app crashes saying exec_bad_access in sharekit code.
I have added the piece of line below where it occurs.
iOS5twitter.completionHandler = ^(TWTweetComposeViewControllerResult result) ;
I tried to reproduce the same issue with the demoapp provided by sharekit.The app runs fine and even posts image.
The crash appears before login authentication. can someone guide me thru this and help me fix this issue
thanks

Resources