Just noticed some strange behaviour testing GKsession on devices running iOS6 and iOS5.1 It seems that a GKSession on a local wireless network using the same session ID in sessionMode:GKSessionModePeer works fine from 6.0 to 5.1 but not the other way round. i.e a session created on 6.0 is 'seen' by 5.1 but not the other way around.
self.theGame.hostListSession = [[GKSession alloc] initWithSessionID:#"FRED"
displayName:[KYTConfig sharedInstance].localPlayerAlias
sessionMode:GKSessionModePeer];
[self.theGame.hostListSession setDelegate:self];
[self.theGame.hostListSession setDataReceiveHandler:self withContext:nil];
[self.theGame.hostListSession setAvailable:YES];
Anyone else experience this or know of any workaround?
Thanks to saulobrito for confirming that it works okay for you. This prompted me to do a clean and build and reinstall the game center framework and the problem disappeared.
Related
Simple line of code:
NSLog(#"Checking on Facebook: %d -- Checking on Twitter: %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook], [SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]);
Problem is that I'm getting 1 for both BOOLs. That's a problem because neither Twitter nor Facebook is setup with an account. This is on the simulator, so wondering if people have experienced this is happening on devices as well?
Documentation says that it should only return true if the service is available and at least one account is setup. But I'm getting true even without accounts setup. I'd like to use the values to hide some social posting buttons so would like this to work.
Did you run the that in Simulator?
It seems isAvailableForServiceType always returns 1 in Simulator.
Maybe you can test it in ipad with IOS6.
From my experience, I can confirm this is a bug in iOS Simulator 6.0. The isAvailableForServiceType method always returns TRUE for any service type on iOS Simulator.
On actual device running current iOS 6.0 it is working as expected.
you can test isAvailableForServiceType: using iOS 7.1 on which it is working with simulator as well.
Here What I checked
NSLog(#"Facebook Enabled : %d",[SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook];
Please check this.
I can also confirm that it's broken [i.e., returns True for all three services] in the Simulator (Xcode 4.5.1, iOS 6.0) -- but that it works properly running on a device (iPhone 4S, running iOS 6.0).
isAvailableForServiceType returns true always in both iPhone and iPad simulators.
The same piece of code is working fine in the iOS 6 iPhone and iPad.
I'm having an issue with using facebookSDK 3.1 on both iOS6 and iOS5.
I got everything running correctly on iOS6 using the tutorials and resources from developers.facebook.com.
Now for iOS5 I'm using the [FBSession openActiveSessionWithReadPermissions:allowLoginUI:completionHandler:] and I see a web authentication pop up in iOS simulator.
However on the callback, I always get back FBSessionStateClosedLoginFailed.
not sure what I need to do to get this working.
Thanks in advance
I have to check whether my app is compatible with iOS 4.0 or not.
I have tried looking out for certain forums but all I can see is to change the iOS deployment target.
I have done doing so also but still my app is running fine. I have changed my deployment target to 3.0 but still it works fine. Since I have used Gesture recognition which was introduced later. It must crash my app (but still it is working fine).
So I want to know Is there any other way out to check my compatability.
Or is it the problem because I am running it on Simulator rather than on device(my device has iOS version 4.2).
Any comments or answers are really appreciated.
Yes thats the reason that your app is not crashing because you are running it over simulator which has the ios version 4.2.Because now your ios version is updated on the simulator so you are able to test the Gesture Recognition over that.You are correct .
If you have an iPhone that is certified for distribution you can just run it on your device and test your firmware versions from there. Hope that helps...
So I had created an app that used the command system("killall SpringBoard"); and it has worked just fine on 4.0 - 4.1. I just recently began testing the app on 4.2 and it still works when I run it in simulator, but when I run it on the device nothing happens. Does anyone know what the cause of this is? The device is a iPhone 3GS.
If you want to restart SpringBoard cleanly, please use
notify_post("com.apple.language.changed");
I've compiled an app with IPhone base SDK 4.0, deployment target on iPhone OS 3.0. This app contains OS 4.0 new feature: local notification.
It works well on iPod 2G with OS 4.0; however it crashes every time the app start up on iPhone 1G with OS 3.0. It appears to be runtime reference error:
"dyld: Symbol not found: _OBJC_CLASS_$_UILocalNotification
Referenced from: /var/mobile/Applications/73A3FAB1-63AE-4A71-8C6B-932142A728FE/Tapatalk X.app/Tapatalk X
Expected in: /System/Library/Frameworks/UIKit.framework/UIKit"
If the UIKit framework is different between SDK3.0 & SDK4.0, why it doesn't report while compiling? How can I apply local notification feature on this app, while the app can still running on devices with OS3.0? Thanks.
This answer solved the problem for me:
That error is being triggered because
you didn't weak-link the UIKit
framework. The UIKit framework in
iPhone OS 3.2 added the
UISplitViewController, and if you link
it in as normal your application will
assume those symbols exist on 3.0,
where they don't.
To weak-link a framework, find your
application target in Xcode, inspect
it, and go to the General tab. At the
bottom of that tab should be a list of
frameworks, with a column for Type.
Change the Type for UIKit from
Required to Weak and rebuild your
application. That should take care of
the runtime errors.
This seems safe to me, given that UIKit is always going to be on the devices we're targetting.
If you use a 4.0 SDK feature and you want to support 3.0 devices, you need to check that the functionality exists before you use it.
If you're using a new class (as you are) something like the following should work:
Class localNotificationC = NSClassFromString(#"UILocalNotification");
if (localNotificationC) {
UILocalNotification* localNotification = [[localNotificationC alloc] init];
// do stuff
[localNotification release];
}
else {
// what to do with the 3.0 SDK
}
As for why the compiler doesn't tell you, well, you told the compiler that you were using the 4.0 SDK and those classes/methods work on 4.0.
I found this information really useful. However my question is how to test if the application crashes or not after this change.
The background is I had the same issue with my iPad application. I have my BaseSDK set as 4.3 and Deployment target is 3.2. I never got this crash while doing ad-hoc provisioning and running the app on 3.2 iPad and it got approved by Apple too. But users reported that when they started the application after download on iPad 3.2 it crashes before showing the main screen even.
I was using [UILocalNotifition alloc] in my code which I think could be the result of below crash:
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x00000001, 0xe7ffdefe
I seem to have fixed this by converting the above statement as per Stephen's suggestion.
However I really don't know how to test it. I am not getting any crash earlier too while testing the application before submission on 3.2 and currently also I am not getting any crash on start up.
I really need to validate this fix before I push the update to app store. Could someone please shed more light on how to test this? It would be really helpful if I can reproduce this crash with the previous version of my application and the same is not the case with current version after this fix.