iOS does not call, running time automatic execution method

Source: Internet
Author: User

Take a friend alliance to give an example

Friends League better, friends of the league read their documents he told you that you have to write this in the Appdelegate Didfinishlaunch method.

[Umsocialdata Setappkey:@"XX"]; //Register[Umsocialwechathandler setwxappid:@"XXX"Appsecret:@"XX"Url:@""]; //QQ Registration[Umsocialqqhandler setqqwithappid:@"XXX"AppKey:@"XXX"Url:@""];

We need to count the information on my page you have access to the Friends of the league statistics in Appdelegate Didfinishlaunch and more lines of code

The demand is endless I need bug stats (Fir HUD) to alert the user scoring system (irate) push (Jpush homing pigeon push. )

Be determined to encapsulate the code perfectly

Iqkeyboardmanage and Irate, the intelligent Daniel's Readme, wrote this passage.

Key Features1) codeless, Zero line of code does not need to write any code 2) works automatically//auto work 3) No more Uiscrollview//do not need SCROLLVIEW4) No more subclasses//No need to inherit parent class 5) No more Manual work//No configuration required 6) No more #imports//no import required

It's not magical, it's just Daniel using the + Load method

Learning OC knows that this code will be automatically called when a class is loaded into the runtime.

#import<foundation foundation.h="">@interfaceThirdpartservice:nsobject@end    #import "ThirdPartService.h" #import "UMSocial.h" #import "UMSocialWechatHandler.h" #import "UMSocialQQHandler.h" #import<mobclick.h>#import<fir fir.h="">@implementationThirdpartservice+ (void) Load {Staticdispatch_once_t oncetoken;dispatch_once (&oncetoken, ^{//TODO Here is my own test of the FIR HUD[FIR Handlecrashwithkey:@"XX"];//Friends League[Umsocialdata Setappkey:@"XX"];//hide platforms that are not installed[Umsocialconfig Hiddennotinstallplatforms:@[umsharetoqq,umsharetoqzone,umsharetowechatsession, Umsharetowechattimeline]];//Register[Umsocialwechathandler setwxappid:@"XX"Appsecret:@"XX"Url:@""];//QQ Registration//TODO QQ is not real[Umsocialqqhandler setqqwithappid:@"XX"AppKey:@"XX"Url:@""];//TODO um statistics[Mobclick Startwithappkey:@""];    [Mobclick Setcrashreportenabled:no]; NSLog (@"third-party service registration complete");});}@end

Automatic call, finished!!!!

  

iOS does not call, running time automatic execution method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.