1
votes

Does anyone tried to use Gigya with swift? I've linked Gigya's framework to project, created bridging file and #import there < GigyaSDK/Gigya.h >. While I'm trying init Gigya - I receive exception

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSString GSGUIDString]: unrecognized selector sent to class 0x10a6bbb20'

*** First throw call stack:
(
    0   CoreFoundation                      0x0000000109e7fe65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010c148deb objc_exception_throw + 48
    2   CoreFoundation                      0x0000000109e8838d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x0000000109dd590a ___forwarding___ + 970
    4   CoreFoundation                      0x0000000109dd54b8 _CF_forwarding_prep_0 + 120
    5   Application                             0x00000001094f6063 -[GSRequest initWithSession:method:parameters:useHTTPS:requestTimeout:] + 515
    6   Application                             0x00000001094f6251 -[GSRequest initWithSession:method:] + 241
    7   Application                             0x00000001094f5ce3 +[GSRequest requestForMethod:] + 131
    8   Application                             0x00000001094fd83b -[Gigya getSDKConfig] + 59
    9   Application                             0x00000001094fc596 +[Gigya initWithAPIKey:application:launchOptions:APIDomain:] + 790

As I checked, this class is Int.

Does anyone know how to solve this problem? Variant with "cut this piece of… Single Sign-On service" doesn't acceptable ;)

2

2 Answers

3
votes

Set Linker Flags to -ObjC in Build Settings.

-1
votes

If you want to use Gigya in the Swift project - you must use not Gigya's framework but Gigya's source (You can find both of them here). Just add it to your project and create bridging file, where you should add

#import "Gigya.h"