GPPSignInButton not loading GooglePlus.bundle when using storyboards - ios

Using Google+ SignIn for iOS SDK v1.4.1, I have a button of class GPPSignInButton placed in a view in a storyboard. It is connected to a GPPSignInButton outlet. GooglePlus.bundle has been added to the project and is copied into the app bundle and can be loaded (programmatically) from within the app at runtime.
When I run the app, either on a device or in the simulator, the button is blue.
I would expect it show a red Sign-in with Google+ button. Creating the button programmatically results in a button that displays correctly. Inspecting the subviews of button instantiated via the storyboard and those of the programmatically created button shows that the storyboard button is missing a UIImageView instance.
The -ObjC linker flag is set. I've even tried adding -all_load with no effect.
I suspect there is a bug in GPPSignInButton's initWithCoder:. Can anyone confirm or reproduce this?

The solution was to set the button type to Custom—a step missing from the Google documentation.

Related

My main.storyboard is not showing up on Xcode

So here are the steps that I do when opening Xcode to make a basic application. I first click on "create a new Xcode project" then I tap on "single view app" for "ios" then I fill out the information such as the name of the app and if I want to use core data etc.. and when I finish and tap on "create" I see no main.storyboard on the left side navigation panel... I do not know if I am doing something right. I initially did everything on the LaunchScreen.storyboard, but when I did something it did not allow me because something called segues..
Select Storyboard in User Interface as shown in the image
Please, select storyboard instead of SwiftUI, as with XCODE 11 by default the value of User Interface is set to SwiftUI and it doesn't include storyboard.

How does one remove a IBAction link to main.storyboard

So I have this weird Problem where I have 4 UIButtons in my App not working at all, even though i have double checked on having them correctly linked to the Storyboard. So i tried to disconnect and reconnect them but the icon indicating that its linked didn´t disappear. So I checked what else the function is linked to and it seems somehow it got linked to the main.storyboard, and i guess for that reason, these are the only ones not working.
So I tried to disconnect it from Main.storyboard, but to no success so far.
How can I remove a connection to the storyboard as sender and why does it appear in the first place?
I too did it accidentally for a button.
Connected a correct segue to the button and accidentally connected one more to a UICollectionView and I was getting this :
Checked the storyboard on right clicking the button :
and found the two outlet connected. Removed it on clicking the cross icon and it worked.
If you click on the connection showing in UIViecontroller it will not redirect here.
you can also check all the connected referencing outlets here:
So i fixed the Problem by copying the code to another file and only "rewriting" the functions that were linked to the given problem.
All i could find to this problem was some old answer that explained that the link referrs to a ViewController that the Code originates from: https://stackoverflow.com/a/37324993/10160115
Even though the Code i wrote is not copied it seems that XCode has created exactly such a referral to the storyboard it was linked to, so it linked the function to itself but couldn´t find any Button to link it to so it just linked it to nothingness.
It fixed the problem and the buttons work the way they´re supposed to be now but it´s a weird way of fixing this, but since there seems to be no connections inspector for the storyboard itself i wouldn´t know how else to fix this
To solve this problem you should (for macOS Catalina 10.15.4, Xcode Version 11.1):
Close your project and close Xcode
Open /Users/XXXXX/Library/Developer/Xcode/DerivedData and delete your cache of project
Open /Users/ХХХХХ /Library/Developer/Xcode/DerivedData/ModuleCache.noindex and delete all cache from this directory
Open your project again and click Product > Build

Swift UIPopover storyboard

I am getting started with Swift right now.
I am rebuilding an old app completely in Swift. It is an iPad-only app.
Right now I can't get UIPopover working.
I am trying to tie a button in a view(1) to another view(2) with segue "Present as Popover".
None of the elements I add to view(2) is shown in the popover in simulator. It is always a blank / white view.
Any help is appreciated!
Is this for iOS 8? If so, try using the "popover presentation" action segue.

UIButton appears different on runtime

I just added a button to the storyboard, but when I run the simulator it appears like in the following picture:
Can someone explain me why this is happening ? For the record I am using Google+ Platform for IOS sdk.
Is kinda weird. Did you set it up programmatically on your view controller class? if not, try adding it programmatically.
The problem is that if you include GooglePlus.bundle in your project, the button will appear like that. It includes the GPPSignIn button.

xCode crashes when I drag custom object into UIScrollView

I have a custom button that is a subclassed UIButton. When I try to drag it into a UIScrollView in IB Xcode immediately crashes. What gives?
I have this custom button working inside a UIScrollView in at least one other location in my app. Any ideas?
UPDATE:
Uncheck "Use Autolayout" in the File Inspector fixes this problem. See answer below.
I have this custom button working inside a UIScrollView in at least
one other location in my app. Any ideas?
I could crash several Java editor like this. The problem it was in my custom component code:
I have added code, which the designer ( Interface builder) have executed to show my component.
Take extra care at init, viewDidLoad methods in your Button code.
Do not know exactly, But once the same kind of issue happened with me.
My problem was that some of my drawing methods were being called recursively, causing the Xcode to crash. I handled those recursive calls and issue got fixed.
SOLUTION: Uncheck "Use Autolayout" in the File Inspector
Thanks to #BornCoder I decided to try running this on my laptop running Xcode 4.4. When I tried to build I got an error saying this version of Xcode doesn't support Autolayout. I didn't intend to use Autolayout, it looks like Xcode 4.5 does automatically. Unchecking the box fixed it.

Resources