2016-10-25 3 views
1

Я использую UnityAds для IOS/Android игр и при создании проекта Xcode для прошивки я получаю следующие ошибки компилятора, связанные с UnityAdsWrapper.mm, файл порожденного UnityUnityAds генерируется ошибка проекта IOS

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:105:15: error: no known class method for selector 'sharedInstance' 

        [[UnityAds sharedInstance] setUnityVersion: UnityAdsCreateNSString(unityVersion)]; 

           ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:105:31: error: no known instance method for selector 'setUnityVersion:' 

        [[UnityAds sharedInstance] setUnityVersion: UnityAdsCreateNSString(unityVersion)]; 

               ^~~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:126:18: error: no known class method for selector 'sharedInstance' 

      if ([[UnityAds sharedInstance] canShowZone:zoneId]) 

          ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:126:34: error: no known instance method for selector 'canShowZone:' 

      if ([[UnityAds sharedInstance] canShowZone:zoneId]) 

              ^~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:130:16: error: no known class method for selector 'sharedInstance' 

          [[UnityAds sharedInstance] setZone:zoneId withRewardItem:rewardItemKey]; 

             ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:130:32: error: no known instance method for selector 'setZone:withRewardItem:' 

          [[UnityAds sharedInstance] setZone:zoneId withRewardItem:rewardItemKey]; 

                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:136:22: error: no known class method for selector 'sharedInstance' 

          [[UnityAds sharedInstance] setZone:zoneId]; 

             ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:136:38: error: no known instance method for selector 'setZone:' 

          [[UnityAds sharedInstance] setZone:zoneId]; 

                 ^~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:139:22: error: no known class method for selector 'sharedInstance' 

        return [[UnityAds sharedInstance] show:optionsDictionary]; 

             ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:139:43: error: cannot initialize a parameter of type 'UIViewController * _Nonnull' with an lvalue of type 'NSMutableDictionary *__strong' 

        return [[UnityAds sharedInstance] show:optionsDictionary]; 

                  ^~~~~~~~~~~~~~~~~ 

In file included from /ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:6: 

In file included from /ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.h:10: 

/ProjectDir/Builds/Build/UnityAds.framework/Headers/UnityAds.h:175:34: note: passing argument to parameter 'viewController' here 

+ (void)show:(UIViewController *)viewController; 

          ^

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:146:21: error: no known class method for selector 'sharedInstance' 

      return [[UnityAds sharedInstance] canShowZone:UnityAdsCreateNSString(rawZoneId)]; 

           ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:146:37: error: no known instance method for selector 'canShowZone:' 

      return [[UnityAds sharedInstance] canShowZone:UnityAdsCreateNSString(rawZoneId)]; 

               ^~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:151:14: error: no known class method for selector 'sharedInstance' 

      [[UnityAds sharedInstance] setDebugMode:debugMode]; 

         ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:156:14: error: no known class method for selector 'sharedInstance' 

      [[UnityAds sharedInstance] setCampaignDataURL:UnityAdsCreateNSString(url)]; 

         ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:156:30: error: no known instance method for selector 'setCampaignDataURL:' 

      [[UnityAds sharedInstance] setCampaignDataURL:UnityAdsCreateNSString(url)]; 

             ^~~~~~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:45:14: error: no known class method for selector 'sharedInstance' 

      [[UnityAds sharedInstance] setDelegate:self]; 

         ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:46:14: error: no known class method for selector 'sharedInstance' 

      [[UnityAds sharedInstance] setDebugMode:debugMode]; 

         ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:47:14: error: no known class method for selector 'sharedInstance' 

      [[UnityAds sharedInstance] setTestMode:testMode]; 

         ^~~~~~~~~~~~~~ 

/ProjectDir/Builds/Build/Classes/UnityAds/UnityAdsUnityWrapper.mm:47:30: error: no known instance method for selector 'setTestMode:' 

      [[UnityAds sharedInstance] setTestMode:testMode]; 

             ^~~~~~~~~~~ 

fatal error: too many errors emitted, stopping now [-ferror-limit=] 

20 errors generated. 

У кого-нибудь есть обходное решение или исправление для этого?

ответ