Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 15    Views: 147

Frogman
Aspiring developer
Profile
Posts: 264
Reg: Jan 05, 2013
Bratislava
11,190
02/16/13 07:09 AM (12 years ago)

Invisible Facebook Plugin

Guys, please how can I uninstall a plugin? I cannot find any way how to delete it. It requires deployment target 6.0 iOS and my app is failing to build... FROGMAN
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/16/13 08:09 AM (12 years ago)
If it's just messing up a particular build, just make sure that the plugin isn't being used (remove any screen/actions from the app 'screens' control panel) and remove the directory from your project files. Otherwise, if you're self hosted you have to manually remove the plugin, and refresh. removal is typically done via "FTP". If you're hosted with BuzzTouch, I'm not actually sure how, lol! I've never tried. Cheers! -- Smug
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/16/13 08:27 AM (12 years ago)
unfortunately, it's not a feature available yet for Buzztouch.com. I wish it were - I have some "plugins" I created and abandoned a while ago.
 
Black White
I hate code!
Profile
Posts: 292
Reg: Feb 22, 2012
hanoi
4,770
like
02/16/13 09:31 AM (12 years ago)
i think you are not add Social Framework that why can't build your app.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
02/16/13 10:03 AM (12 years ago)
You can always delete the plugin from inside your project files.
 
Frogman
Aspiring developer
Profile
Posts: 264
Reg: Jan 05, 2013
Bratislava
11,190
like
02/16/13 10:34 AM (12 years ago)
Hi Guys, thanks for your help. Indeed I missed to read the description carefully and I had to add the social framework. I did add it and now it works fine. The other story is that now I probably have to use the 6.0 Deployment target? I DON'T KNOW. That would exclude part of the potential users who are still on 4.2, 4.3, 5.0... I could not find out how to delete a plugin in the buzztouch.com control panel. There are some guidelines out there, but it seems those were valid for the previous release, as in 2.0 there is no such option as to delete it. Maybe it is a good challenge for David and the gang. By the way, deleting the plugin manually from the downloaded folder means another crash, the Xcode was missing it. Have a good coding everybody, I like this place a lot! Frogman
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
02/16/13 11:19 AM (12 years ago)
Try deleting the folder from from inside of Xcode. After you drag the your plugins folder to the project, but before you make any changes from the read me for that plugin. Right click the folder. Delete it. You will get a pop up. Click 'move to trash'. Doing it this way should tell Xcode to remove any references to those files. If your going to try redownloading the project from your CP make sure that the old version gets completly deleted from xcode before downloading from the CP again. Window -> Organizer -> click on projects (up top)-> on the left panel find and click on the project -> find and click on the delete button (on the right)
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
02/16/13 11:40 AM (12 years ago)
If you don't mind deploying to iOS 6 only(at least a 80% install base) then ignore this. To clarify from above. Its best to start with a clean project 1) Delete your project from xcode Window -> Organizer -> click on projects (up top)-> on the left panel find and click on the project -> find and click on the delete button (on the right) 2) go back to your CP, repackage and download your project. 3) drag and drop your folders into xcode per the buzztouch instructions. 4) before making any other changes delete the Facebook plugin. Right click the FB plugin folder. Delete it. You will get a pop up. Click 'move to trash'. Doing it this way should tell Xcode to remove any references to those files.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
02/16/13 01:26 PM (12 years ago)
I warned this would happen let's fix this programatically, You can still have this feature in your app, but it just won't work for users without iOS 6, but as long as we tell them why and don't crash there app they'll be fine. First you need to add the social.framework and set it to optional not required. If you now run the app you will notice the app will now build, but when you click the button that has the share screen the app will crash. Yup we need to fix this. Next we need to add a bit of code that says, hey iphone do you have the social framework. Let's add that that method (put it outside any curly braces) +(BOOL)isSocialAvailable { return NSClassFromString(@"SLComposeViewController") != nil; } This will now return yes or no We now need to write a new method that takes that checks that result and makes a decision. Hey you have got the social framework make that share, or you haven't got it ah well lets tell these guys you need iOS 6 to use this feature. Use this code -(void)checkSocial{ if ([Tm_invisiblefacebook isSocialAvailable]) { // get the view controller that called you, then remove yourself from the view heiarchy UIViewController *vc; vc = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count - 2]; [self performInvisibleActionWithVC:vc]; }else { [BT_debugger showIt:self:@"Oh no, there isn't iOS6 don't worry I won't crash"]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Feature not available" message:@"You require iOS 6 to share using this app dude" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; } } Cool did you notice this had been copied from the view did load. That's because these are the lines that launch the facebook or tweet sheet // get the view controller that called you, then remove yourself from the view heiarchy UIViewController *vc; vc = [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count - 2]; [self performInvisibleActionWithVC:vc]; now go to view did load and remove that code replace it with this [self checkSocial]; That line launches the new code we wrote earlier. Hopefully nothing gets changed when I submit lol. You can do the exact same thing with the twitter plugin too.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
02/16/13 03:46 PM (12 years ago)
Hey @Chris1 We can delete 'our own' created plugins from the BT Control Panel... Click on the un-needed plugin in your plugins. Click on 'manage' and there is a link to 'remove from control panel' in there, if it hasn't been submitted for approval. Otherwise, you have to reject the approval process and then remove it. Cheers! -- Smug @Frogman - iOS 6+ runs on the iPhone 3GS and other 'legacy' devices. Coding in iOS 6 'will' alienate 'some' users, but not as many as you'd think. But I feel ya; I have a 1st Gen iPad I still use as a demo; it's on v5.1.1
 
Susan Metoxen
buzztouch Evangelist
Profile
Posts: 1706
Reg: May 01, 2011
Hopkins, Minnes...
26,260
like
02/16/13 09:11 PM (12 years ago)
Thank you, Kittsy! You rock! For the Plugin Market, if the plugin requires a certain minimum deployment target, I have been adding that to the short description you see on the Plugin Market page. That way users will know before they buy it that they will need a higher deployment target. Of course, Kittsy has a fix here for this, although some users may not want to touch the code.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
02/16/13 09:27 PM (12 years ago)
Thanks Smug - that makes me really happy! Here's a suggestion for Buzztouch: Allow us to set the deployment targets in our control panel and only download plugins that are applicable. Maybe even disallow adding the plugin as a screen if it is for an unsupported os target. Would require some coding on David's part, and an extra field on each plugins config.php. But it could solve a lot of these issues.
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
02/17/13 09:21 AM (12 years ago)
Thanks Kittsy. I just had to add some similar code to deal with EventKit in iOS 6/less than 6. Love that technique, similar code is gong to go in lots of future work. Reminds me of dealing with years of .dll incompatiblity. Had to write a million vbs scripts to do similar stuff. I love being backward compatible. This is how you do it. I had something in the other Tweet Sheet plug-in to deal with ios 4/5, but that plug-in is probably useless now. Not sure, haven't seen what he did to the CP but would assume it's got the same fields I extended with JSON.
 
Frogman
Aspiring developer
Profile
Posts: 264
Reg: Jan 05, 2013
Bratislava
11,190
like
02/18/13 06:55 AM (12 years ago)
Susan, I saw it in the description that I need a higher deployment target, but I did not realize that it is mandatory since that moment, otherwise the build will crash. Maybe if there was an option to remove a plugin from the CP it may also solve the problem. I guess that I found it somewhere that there is an option to remove a plugin, but I cannot find it in this version. I will try to learn more in terms of changing the code and go self-hosted, then I believe I can resolve it myself. Thanks to everybody for suggested solutions. I got my app running with deployment target 6.0 and conquerred the provisioning portal today. I suggest the guys who created the provisioning portal should be given a Nobel prize. Especially code signing process brought me to such state of mind, that I did not experience for years. Thank you provisioning portal... Regards, Frogman
 
Frogman
Aspiring developer
Profile
Posts: 264
Reg: Jan 05, 2013
Bratislava
11,190
like
02/23/13 09:01 AM (12 years ago)
Anyway, thank everybody for your answers. FROGMAN
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
04/29/13 10:35 AM (12 years ago)
Thanks again Kittsy for these mods, updated my source code and these fixes work GREAT. Appreciate it!
 

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.