IOS Google OAuth error occured after 1 success authentication - ios

I was trying to make a Google authentication with swift to get message list. However i follow all steps in Google here
after i run in simulator and success logging in to my account authentication was successful. then problem appears after all success which is weird. does any knows how to fix this?
selector "displayResultWithTicket:finishedWithObject:error:" is unimplemented or misnamed
Assertion failure in void GTMSessionFetcherAssertValidSelector(id _Nullable __strong, SEL _Nullable, ...)(), /Users/macbookpro/Documents/Zaiya/Pods/GTMSessionFetcher/Source/GTMSessionFetcher.m
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'callback selector unimplemented or misnamed'
please share your knowledge, thanks!
actual run error:

I ran into the same problem. I believe it's because Google hasn't updated the Quickstart for Swift 3 yet.
Change:
displayResultWithTicket:finishedWithObject:error: to #selector([Your View Controller Name Here].displayResultWithTicket(ticket:finishedWithObject:error:)), which is in line with the new Swift 3 syntax

Related

AKMicrophone causes SIGABRT error - A bug?

I found a post that has the same error in the same situation here:
https://groups.google.com/forum/#!topic/audiokit/SmyuzPJQ6wU
Same as this poster - I'm using the source. However, at the end of the post the user does not say what he did to fix the issue.
I'm currently using an unaltered "ExtendingAudioKitUsingSource" example as I need to add some functionality to audiokit. (unaltered outside of using my provisioning profile and adding "let m = AKMicrophone()" in ViewController.swift.
I receive these errors:
2018-08-31 15:16:50.684 ExtendingAudioKit[6800:8850964] 15:16:50.683
ERROR: [0x39058000] AVAudioIONodeImpl.mm:452:
___ZN13AVAudioIOUnit9EnableBusEm_block_invoke: error -10849
2018-08-31 15:16:50.688 ExtendingAudioKit[6800:8850964] ***
Terminating app due to uncaught exception
'com.apple.coreaudio.avfaudio', reason: 'error -10849'
which traces back to line 46 in AKMicrophone.swift to init(): AudioKit.engine.connect(AudioKit.engine.inputNode, to: self.avAudioNode, format: nil)
I've had no issues using AKMicrphone() outside of this project.
I have fixed an AKMicrophone bug in AudioKit v4.5.1 that may have fixed this for you. If not, I'll withdraw this answer, but please check it out and let me know.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: self.senderId != nil'

I'm playing with JSQMessagesViewController. My first project I did using Raywenderlich's Firebase Tutorial: Real-time Chat tutorial.
Then I created a new project to play more with JSQMessagesViewController. And in this new project I'm having issue now.
After I import JSQMessagesViewController and add it as a super class for my ViewController, I got this error in my console -
Assertion failure in -[NewProject.ViewController viewWillAppear:],
/Users/Downloads/ChatChatFirebaseTutorial-finished/Pods/JSQMessagesViewController/JSQMessagesViewController/Controllers/JSQMessagesViewController.m:233
2017-05-30 20:43:44.498 NewProject[10688:314277] *** Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Invalid parameter not satisfying: self.senderId != nil'
I see message from ChatChatFirebaseTutorial(am I right?) my previous project in my new project.
So, I deleted everything what was about ChatChatFirebaseTutorial and even more from my mac. It didn't help. I uninstalled and installed pods from project and mac few times. It didn't help.
Did anyone has this issue before? If yes, how did you solve it?
The Library requires that you set a senderID for the current user. This can be done by adding a function like this to your class
override func senderId() -> String {
return "UNIQUEID"
}
I would use something you know is going to be unique such as an email or a unique Id you generate just associated to the user so you can determine who sent the messages.

Why am I getting a `unrecognized selector sent to instance` error?

I have a Ruby on Rails application that has an API, it's an OAuth 2.0 provider and uses Doorkeeper. I am creating an iPhone client for that application and am using the gtm-oauth2 library for authentication. Here is the Github repository for the iPhone app.
I manage do the authentication request using the library and get the response from the OAuth server, but (I think that) when the iPhone app receives the response, the iPhone app crashes. I get the following error:
2013-03-25 07:30:51.563 Catapult for iOS[68917:c07] -[NSNull length]: unrecognized selector sent to instance 0x14f2678
2013-03-25 07:30:51.564 Catapult for iOS[68917:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x14f2678'
*** First throw call stack:
(0x13c1012 0x11e6e7e 0x144c4bd 0x13b0bbc 0x13b094e 0xf074 0x185e3 0x13b51bd 0x13b50d6 0x1531a 0x1512b 0x14ae2 0x13b51bd 0x13b50d6 0x11d0a 0x1032a 0x13b51bd 0x13b50d6 0x79be 0x77ed 0x8cf2 0xcec589 0xcea652 0xceb89a 0xcea60d 0xcea785 0xc37a68 0x4a2a911 0x4a29bb3 0x4a67cda 0x13638fd 0x4a6835c 0x4a682d5 0x4952250 0x1344f3f 0x1344a39 0x1367734 0x1366f44 0x1366e1b 0x22be7e3 0x22be668 0x12affc 0x2c6d 0x2b95)
libc++abi.dylib: terminate called throwing an exception
I am a complete noob/beginner when it comes to iOS development and Objective-C programming, and I am learning how to create my first app using this little project. I asked the same question in the gtm-oaut2 Google Group and according to them, the problem comes from my code and not the library. The problem is that all of my code is taken from their wiki and I can't pinpoint where the app crashes. If I understand correctly, at some point I am calling length of NSNull, but I am not calling length anywhere, hence my confusion. Also, when the app crashes, the line hilighted is in the main.m file and the error (on the right label, not in the output) is the following:
Thread 1: signal SIGABRT
I have no clue what that means...
Does anyone know what the problem might be please?
You're right that the issue is that somewhere you've got the length message being sent to an instance of NSNull. To pinpoint where exactly this is happening set a breakpoint on objc_exception_throw. You can do this in the Xcode UI with little "+" button in the bottom left corner on the breakpoints tab. Select "Add Exception breakpoint." Then the debugger will stop your program at the point where the error occurs instead of waiting for the program to actually crash.
Well... you understood the error correctly.. You are somewhere calling length on a NSNull instance.
I must find out where this is happening.
I think this is happening in a JSON response. Maybe you (or "the code") is calling length on something it expects its a NSString but it is instead NSNull (that is the json has a NULL value).
Try if you manage to print the json response and see if you found a key mapped to a null value...
NSNull does not respond to length
You can check the documentation for NSNull to see that this is the case.
Without having an idea of what your code base is doing I am not sure where to look, you must be calling [NSNull null]; at some point to get the NSNull object or you are using a framework somewhere that returns this.

Integration and Use of W3i iOS Advertiser SDK to advertise our iOS app

I'm integrating W3i Advertiser SDK in iOS app, but app is being crashed at following line.
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID];
and here is exception:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
I Searched a lot but there is no information on net related to w3i's integration and it's use except w3i's official guideline.
https://associate.w3i.com/integration/W3i_iOS_Advertiser_SDK_Integration_Guide1.htm
https://associate.w3i.com/integration/index.html
Here are steps i'm following:
Step1: Download SDK from W3i
Step2: Drag W3iAdvertiserSdk-3.2.0 folder into project's file folder
Step3 Add a link to the following frameworks if not already present:
AdSupport.framework
UIKit.framework
Foundation.framework
CoreGraphics.framework
Step4: Add to your AppDelegate.m file, #import "W3iAdvertiserSdk.h"
If I run the app after above Integration then app runs fine without any error but when i call the method of W3iAdvertiser to connect with app then it it throws exception which i've already posted above.
// add this line to application's didFinishLaunchingWithOptions method
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID]; //appId created at w3i
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
Can anyone please guide me where i'm going wrong, how to use SDK's functions to connect App with w3i's to advertise our app through w3i ?
You need to follow this step as well:
Add -ObjC to Other Linker Flags in your target's Build Settings. That will allow "Option 1" to not crash.
There are two ways to connect app with w3i:
Option1: Integrate W3i-iOS-SDK, and call it's method "connectWithAppId" at start of application.
Option2: Call W3i "appWasRun" API at start of application
first option didn't work for me, but Option2 is quite easy and working fine.
Here is format of API and it's parameters:
http://api.w3i.com/PublicServices/MobileTrackingApiRestV1.svc/AppWasRun?AppId={APPID}&clientIp={CLIENTIP}&iOSIDFA={advertisingIdentifier}&iOSUDID={IOSUDID}&iOSOpenUDID={IOSOpenUDID}&iOSMD5WLANMAC={iOSMD5WLANMAC}&iOSSha1HashedMac={iOSSha1HashedMac}
Request Type: GET
Required Parameters: APPID (generated by W3I) and at-least one identifier (all parameters are preferred by W3i)
I used only OpenUDID and it worked fine.
http://api.w3i.com/PublicServices/MobileTrackingApiRestV1.svc/AppWasRun?AppId=W3i_APP_ID&iOSOpenUDID=OPEN_UDID
For More Information check the following links.
https://sites.google.com/site/w3ideveloperscom/ios/iOSAFPP/advapi
https://associate.w3i.com/integration/Device_Identifiers.htm
Hope it would help others in future :)

Facebook iOS integration login window

I wanna put iOS Facebook integration. So I am using new Facebook SDK and so here in this Facebook tutorial documentaion provided by this link which are as under.
http://developers.facebook.com/docs/mobile/ios/build/
It's enough or we have to add Functionalities like HAckbook example in the git hub.
in which view we have to code.
I follow the facebook tutorial ios found the error log are as under.
2012-05-30 16:15:09.573 ComleX1App[6121:12203]
-[ComleX1AppAppDelegate_iPhone logoutButtonClicked]: unrecognized selector sent to instance 0xc559ba0
2012-05-30 16:15:09.574
ComleX1App[6121:12203] * Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: '-[ComleX1AppAppDelegate_iPhone
logoutButtonClicked]: unrecognized selector sent to instance
0xc559ba0'
* First throw call stack: (0x15e3022 0x1774cd6 0x15e4cbd 0x1549ed0 0x1549cb2 0x15e4e99 0x61f14e 0x61f0e6 0x6c5ade 0x6c5fa7 0x6c5266
0x6443c0 0x6445e6 0x62adc4 0x61e634 0x1d3def5 0x15b7195 0x151bff2
0x151a8da 0x1519d84 0x1519c9b 0x1d3c7d8 0x1d3c88a 0x61c626 0x21e9
0x2165 0x1) terminate called throwing an exception(lldb)
Without actually looking at the code, it seems that the logoutButton from which you call the selector is released before it can call the actual method. Can you post some of your code to see where it fails?

Resources