zoukankan      html  css  js  c++  java
  • IOS 接ShareSDK问题

    如果报错AGCommon 等错误 

    引用libicucore.A.dylib

    ShareSDK 官网 管理中心 → 创建一个新的应用 获得key之后  啥都别做。!

    - (BOOL)application:(UIApplication*)application openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication annotation:(id)annotation
    {
        NSMutableArray* keys    = [NSMutableArray arrayWithCapacity:3];
        NSMutableArray* values    = [NSMutableArray arrayWithCapacity:3];
    
        #define ADD_ITEM(item)    do{ if(item) {[keys addObject:@#item]; [values addObject:item];} }while(0)
    
        ADD_ITEM(url);
        ADD_ITEM(sourceApplication);
        ADD_ITEM(annotation);
    
        #undef ADD_ITEM
    
        NSDictionary* notifData = [NSDictionary dictionaryWithObjects:values forKeys:keys];
        AppController_SendNotificationWithArg(kUnityOnOpenURL, notifData);
        //return YES;
        
        return [ShareSDK handleOpenURL:url sourceApplication:sourceApplication annotation:annotation wxDelegate:self];  
    }
    
    - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
    {
        return [ShareSDK handleOpenURL:url wxDelegate:self];
    }

    打开AppController.mm文件,添加ShareSDK.h头文件:

    #import <ShareSDK/ShareSDK.h>

    新增handleOpenURL的处理方法,代码如下:

    (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
    {
        return [ShareSDK handleOpenURL:url wxDelegate:nil];
    }
    // 这个方法 AppController 默认有 所以把return 的那段代码 拷贝到后面就行。 红色部分改成  self
    (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
    {
        return [ShareSDK handleOpenURL:url sourceApplication:sourceApplication annotation:annotation wxDelegate:nil];
    }
  • 相关阅读:
    progID
    windbg
    msil_accessibility_b03f5f7f11d50a3a_6.1.7600.16385_none_2232298e4f48d6ba
    jupybook编程快捷键
    django遇到的error(待续)
    python 遇到error(待续)
    前端 遇到error(待续)
    sql语句组件 在框架中的应用
    django models分页
    Python的学习之旅———用户与程序交互
  • 原文地址:https://www.cnblogs.com/123ing/p/3884809.html
Copyright © 2011-2022 走看看