It works not correctly at Xcode8 beta1
Closed this issue · 9 comments
Thanks for the report! I'll look into this.
What iOS version are you running this against? Does it work properly if you run XCode 8 with an iOS 9 device/simulator?
Looks like an iOS 10 bug. NSUserDefaults don't work properly even without using JEUserDefaults.
@JohnEstropia
Xcode8 - ios 9.3 simulator works properly(same as Xcode7 - ios 9.3)
Xcode8 - ios 10.0 simulator works incorrectly
This looks like a problem on iOS 10 (simulator) side so I'm closing this issue.
Do submit a bug report to Apple :)
@JohnEstropia It seems that we must enable keychain sharing in iOS 10 to access keychain.(Verified at Xcode8 beta6)
http://stackoverflow.com/questions/38689631/how-to-use-facebook-ios-sdk-on-ios-10/38799196#38799196
But the keychain data will not be copied to new keychain sharing group,is there a good idea to copy it? Thanks!
PS:
is it necessary to modify#define USERINFO [[BSAUserInfo alloc]init]
to #define USERINFO [[BSAUserInfo alloc]initWithService:@"com.JEToolkit" accessGroup:NewKeychainSharingName]
?
@hstdt
Hi!
Is BSAUserInfo
your JEKeychain
subclass? If so, then yes that's how you'd do it.
@hstdt Have you tried enabling keychain access in Xcode without adding a keychain access group? I think your old code should work as it was.
@JohnEstropia
Thanks for your reply.
Enable keychain will automatic add a keychain group by Xcode.And I think keep it empty is not a good way to solve problem.
Today I tried a few times by your advice (Xcode 7,Xcode 8, iOS9, iOS10),I find out that accessGroup
be nil can work well sometimes.
If project need keychain sharing,and JEKeychain
is designed as singleton,so we only need to find one way of access keychain at the beginning. I believe one of below will work...😁
but wait for the stable Xcode version.