以前こちらでxcodeのエラーについて質問させて頂いたものです。
https://teratail.com/questions/9156
以前のエラーは解消されたのですがまた別の
linker command failed with exit code 1 (use -v to see invocation)
というエラーがでてしまいました。
調べてみると
①必要なframeworkがない
②誤って同じ名前のクラス名の物を違うh.ファイル名でコンパイルしたとき
と二つの可能性があるようでした
①についてはしっかりframeworkはxcode上で揃っているのを確認し、念のためBuild SettingsのLibrary Search Pathsにあるひとつのディレクトリ内にもframeworkをxcode上からコピーしていれてみましたが変わりませんでした。
②については
ページごとに名前を設定するself.screenName部分がクラスになるのでしょうか?
もしこれだとしてもまだテストで1ファイルにしかこのコードをいれていないので重複はしていないので困っています
自分で関係があるのではないかと思う部分の詳細なコードを記載させていただきます。
AppDelegate.m
#import "AppDelegate.h"
#import "GAI.h"
-
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.//insert value for variables
tabIndexCurrent = 1 ; //the first tab of tabbar
tabIndexBefore = -1 ;
contest_type = 0; // none contest
contest_id = @""; // none contest
catID_flag = false; //tap on button catagories in tab My Page (true: tapped - false: not be tapped)
catID = @"";
catName = @"";
strDeviceToken = @""; //none device token
JxI = @"";
JxUIX = @"";
path = @""; //path for copy file configInfo.plist to Document folder
isUpdate = @"NO"; //NO = has not been updated yet
numberOfNotifications = @"0";
isFirstRunContestTab = @"";
_isFirstRunApp = @"";
strURLTemp = tabContest;
isPostingContest = false;
isLeavedTab = false;
imageName = @"icon_dissableCrow.png";
isExistiOSTwitterAccount = false; //True: user already logined on system iOS twitter;
screenNameTwitter = @"";
twitter_enable = @"";
twitter_text = @"";
pushNotification_alert = @"";//Connect to GrowthPush Notification
[EasyGrowthPush setApplicationId:2922 secret:@"QJrUUHQGHtDx9LpKcHiouPtEY4dRVIHg" environment:kGrowthPushEnvironment debug:YES];
// Optional: automatically send uncaught exceptions to Google Analytics.
[GAI sharedInstance].trackUncaughtExceptions = YES;// Optional: set Google Analytics dispatch interval to e.g. 20 seconds.
[GAI sharedInstance].dispatchInterval = 20;// Optional: set Logger to VERBOSE for debug information.
[[[GAI sharedInstance] logger] setLogLevel:kGAILogLevelVerbose];// Initialize tracker. Replace with your tracking ID.
[[GAI sharedInstance] trackerWithTrackingId:@"トラッキングコード"];id<GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
// Check to see if this is an iOS 8 device.
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
// Register for push in iOS 8.
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
else
{
// Register for push in iOS 7 and under.
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
}//Check version for HTML Source
[self copyPlist];configInfoDict = [NSMutableDictionary dictionaryWithContentsOfFile:path];
NSLog(@"configInfoDict: %@", configInfoDict);
JxI = [configInfoDict objectForKey:@"JxI"];
JxUIX = [configInfoDict objectForKey:@"JxUIX"];
isUpdate = [configInfoDict objectForKey:@"isUpdate"];
_currentVersionHTMLFromFile = [configInfoDict objectForKey:@"Version"];
isFirstRunContestTab = [configInfoDict objectForKey:@"isFirstRunContestTab"];
_isFirstRunApp = [configInfoDict objectForKey:@"isFirstRunApp"];//Create a fake UDID for device
NSString *domain = @"www.aaatest.com";
NSString *key = @"auaatest";
secrect_udid = [SecureUDID UDIDForDomain:domain usingKey:key];//Get number of notifications
[self.implementAPIBussiness getNumberOfNotificationsWithJxI:JxI];//update SecureUDID for server numbers of download aaa app
if ([_isFirstRunApp isEqualToString:@"NO"])
{
[self newDownload:secrect_udid];[configInfoDict setValue:@"YES" forKey:@"isFirstRunApp"]; _isFirstRunApp = @"YES"; if ([configInfoDict writeToFile:path atomically:YES]) { NSLog(@"Edit file plist successfull"); }
}
//Get version HTML from server
[self.implementAPIBussiness checkVersionHTML];[self performSelector:@selector(loadScreen) withObject:nil afterDelay:1.0];
return YES;
}
TimelineViewController.h
#import "GAITrackedViewController.h"
@interface TimelineViewController : GAITrackedViewController <UIWebViewDelegate, UISearchBarDelegate, UIAlertViewDelegate, UIScrollViewDelegate, EGORefreshTableHeaderDelegate>
{
AppDelegate *mainDelegate;
EGORefreshTableHeaderView *_refreshHeaderView; UIScrollView *webScroller; BOOL _reloading;
}
TimelineViewController.m
#import "GAITrackedViewController.h"
@interface TimelineViewController (){
CGRect originalFrame;
}
@end
@implementation TimelineViewController
-(void)viewWillAppear:(BOOL)animated
{
_webView.delegate = self;
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:@"numberNotification" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:@"tapTabTimelineAgain" object:nil]; [super viewWillAppear:animated];
self.screenName = [NSString stringWithFormat:@"%@", NSStringFromClass([self class])];
self.screenName = @"timeline";
}
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/01 02:19
退会済みユーザー
2015/05/01 02:26
2015/05/01 02:41