Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
02/11/14 02:57 PM (10 years ago)

Help with Socialize

Ever since the 3.0 update, I can't figure out how to put the socialize bar into my .m file. I am receiving an error stating "Use of undeclared identifier 'screen Data' ". Here's the code I am using: NSString *htmlEntity = [NSString stringWithFormat:@"%@", [BT_strings getJsonPropertyValue:screenData.jsonVars:@"navBarTitleText":@""]]; if (self.actionBar == nil) { self.entity = [SZEntity entityWithKey:htmlEntity name:htmlEntity]; self.actionBar = [SZActionBar defaultActionBarWithFrame:CGRectZero entity:self.entity viewController:self]; self.actionBar = [SZActionBarUtils showActionBarWithViewController:self entity:self.entity options:nil]; }
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/11/14 02:58 PM (10 years ago)
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/11/14 03:06 PM (10 years ago)
try 'self.screenData.jsonVars"… NSString *htmlEntity = [NSString stringWithFormat:@"%@", [BT_strings getJsonPropertyValue:self.screenData.jsonVars:@"navBarTitleText":@""]]; Cheers! -- Smug
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/11/14 03:54 PM (10 years ago)
In that instance, I get the error "No known class method for selector 'getjsonPropertyValue"
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/11/14 04:41 PM (10 years ago)
hmmm…. it worked for me… Let me take another look with real code this time, lol! Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/11/14 04:42 PM (10 years ago)
Which method are you trying to place this code? Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/11/14 04:46 PM (10 years ago)
Ah. got it. The basic problem is 'abbreviated' method calls… it needs to be 'spelled out' in the newer version of iOS similar to the changes we experienced between iOS5 and iOS6. Try this: NSString *htmlEntity = [NSString stringWithFormat:@"%@", [BT_strings getJsonPropertyValue:self.screenData.jsonVars nameOfProperty: @"navBarTitleText" defaultValue:@""]]; notice in the method call, we also have to include the 'nameOfProperty' and 'defaultValue' tags within the call… the older iOS would let you get away without it. The new one does not. Cheers! -- Smug
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/11/14 05:54 PM (10 years ago)
Now I get a Mach-O Linker Error "Linker command failed with exit code 1" I checked all my Frameworks, restarted my computer, uploaded a whole new package… and Mach error again.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/11/14 05:59 PM (10 years ago)
Hmm… That might take a bit of snooping. Have you checked out the Troubleshooting tutorials from GoNorthWest and Chris1? Mark (GNW) created a pretty good one that covers all basics for both Android and iOS. Chris wrote one that drills on iOS primarily. Both of them have saved me hours. https://www.buzztouch.com/files/howtos/Problem_Reporting_and_Basic_Debug_v1.0.pdf https://www.buzztouch.com/files/howtos/exception%20debugging%20how-to.pdf That Mach-o-linker can be a real pain, because it's more of a 'general' problem. That said, things typically work well. Try removing the 'socialize' code and recompile and see if it works. If so, check to make sure you have the latest socialize SDK; something they've done might have also had to change between iOS6 and iOS7… Cheers! -- Smug
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/11/14 09:53 PM (10 years ago)
It compiles without the socialize but with Socialize along with the new SDK, still the Mach error. Using the tutorials you sent me, I am receiving "ld: 1 duplicate symbol for architecture i386". So, somewhere I am having a duplicate something or added something that doesn't belong but I don't know where to find this or what it could be. Here's a screen shot of what I am seeing in the debug. And btw, those made so much sense - thank you. https://www.dropbox.com/s/ftsgb69et56qesl/Screen%20Shot%202014-02-11%20at%209.48.49%20PM.png
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/11/14 10:14 PM (10 years ago)
I kind of see what's going on… You've got two methods doing the same thing in two different 'Reachability' files… I've actually had that problem before, doing location based stuff. If the scringo/socialize stuff is the only thing you're working with that is location based, you could probably get away with either commenting out the symbol in BT_reachability.m _kReachabilityChangedNotification Or possibly removing the whole file, but you never know what could blow up as a result. Make sure you have a backup before you try anything drastic. But the summary is, there are two 'reachability' thingys; 1 BT, 1 Scringo. One of them has to go. Cheers! -- Smug Meager Backstory: "Reachability" is basically trying to see if it can obtain information from a Network, be it WiFi or Cellular. Since scringo uses a LOT of network stuff, it makes sense that they need to use it, or their version of it. However, the same functionality also comes with the Buzztouch core; I use it in my Smug MsgLoc plugin (which is how I found out about the duplicate stuff). So, you'll need to almost 'cherry pick' which methods to comment out in which file, which can be a bit daunting and tedious. Worst case: Contact the folks at Scringo and see if they can help. They're much better at that part than I am. But if I have anything to contribute, I'm happy to help.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
02/11/14 10:59 PM (10 years ago)
Good catch, Smug! :-)
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/11/14 11:53 PM (10 years ago)
I've managed to get my app up and running in the simulator. So, the fix at this point was commenting out "kReachabilityChangedNotification" in the BT_reachability.m. Nice work:) When I go into the PDF plugin where I have Socialize placed, a pop up screen appears that says, "Error Missing Parameters: key". I hit Ok and press the "like" button in Socialize and the app crashes. Everything else in Socialize works great except for the "like" button.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
02/12/14 12:14 AM (10 years ago)
Try messaging MrVanBeveren, he likes and uses Socialize more than Scringo.
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/12/14 12:48 AM (10 years ago)
I figured it out. What I had to do was in the pdfdoc.m file, I had to switch out "navBarTitleText" with "itemNickname". And I'm up and running. Thank you for all your help:))
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/12/14 12:51 AM (10 years ago)
Yeah, you're moving into an area I have no clue about. One of thousands, lol! But there is some interesting conversations on similar issues here: http://www.buzztouch.com/forum/thread.php?tid=319C8A212A30E77FB0B9760&currentPage=19 and here: http://www.buzztouch.com/forum/thread.php?tid=D943E4B95E140D6901F3C1E Granted, they're working with the old BTv2, not v3, so some of the iOS calls may need to be 'enhanced' similar to the one in your first post. Still, with a bit of perseverance, I think you can kick this one into submission soon enough! Cheers! -- Smug Edit: Submitted this after your answer. Glad you got it working! :)
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/12/14 12:53 AM (10 years ago)
Wait…actually, it works but I am now missing the top left (refresh) and top right button (info) on the home screen. So, I get one thing to work and the other fails me. Any ideas on this one?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/12/14 12:55 AM (10 years ago)
Hmm… Well, I know you want to 'add' to the NavBar, not replace it. But I don't mess with socialize, so I wouldn't know how they do it and where to start. But 'this button' not working or 'that button' not working was part of the narrative on one of those posts; hopefully they can provide some kind of guidance… Cheers! -- Smug
 
Becky
I hate code!
Profile
Posts: 269
Reg: Aug 08, 2012
NYC
6,140
like
02/12/14 01:52 AM (10 years ago)
I think I may need to sleep on this one. I'm at the point I don't know which direction to take. Do I go back to Socialize not working or stick with my top navigation bar not working :) I've done Socialize multiple times but it was not until 3.0 that I can't seem to get it working correctly for the life of me. The good news is, my app is up and running. Thank you for a fix I will be coming back to. Cheers Smug!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.