iOS自定义模板在Xcode 5中缺少方法
我有一套用于应用程序开发的自定义Xcode模板。我有一个Xcode 4版本正在运行,然后我尝试为Xcode 5更新和安装它们,我注意到我的代码中缺少两个重要部分。main.m和application:didfishlaunchingwithoptions:method中的@autorelease部分位于我的AppDelegate.m文件中 main.m (应该是什么样子): (我的看起来如何): AppDelegate.m (缺少此方法): 我的模板将在Xcode内部和projects actual文件夹中构建应用程序的文件重新组织,以创建数据、编程(业务)和演示的三层文件夹结构。我的问题是,移动这些文件是否会导致此错误,或者是否有另一个模板我没有注意到?这两段代码添加到哪里?我已经检查了我能找到的所有模板文件,没有看到需要修改什么才能使这些模板再次工作 我修改的模板包括:iOS自定义模板在Xcode 5中缺少方法,ios,iphone,objective-c,xcode,templates,Ios,Iphone,Objective C,Xcode,Templates,我有一套用于应用程序开发的自定义Xcode模板。我有一个Xcode 4版本正在运行,然后我尝试为Xcode 5更新和安装它们,我注意到我的代码中缺少两个重要部分。main.m和application:didfishlaunchingwithoptions:method中的@autorelease部分位于我的AppDelegate.m文件中 main.m (应该是什么样子): (我的看起来如何): AppDelegate.m (缺少此方法): 我的模板将在Xcode内部和projects actu
- Base.xc模板
- Bundle Base.xctemplate
- Cocoa Touch Application.xctemplate
- iphonebase.xc模板
- Objective-C Application.xC模板
- 单视图应用程序.xctemplate
- Storyboard Application.xctemplate
非常感谢您的帮助。我修复了我遇到的错误。对于@autorelease,我没有在Cocoa Touch Application.xctemplate中将路径添加到它的键
<key>programming/core/main.m:main:UIApplicationMain</key>
<string>@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([___VARIABLE_classPrefix:identifier___AppDelegate class]));
}
</string>
<key>programming/controllers/___VARIABLE_classPrefix:identifier___AppDelegate.m:applicationdidFinishLaunchingWithOptions</key>
<dict>
<key>Beginning</key>
<string>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.</string>
<key>End</key>
<string> return YES;
}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>
programming/core/main.m:main:UIApplicationMain
@自动释放池{
返回UIApplicationMain(argc、argv、nil、NSStringFromClass([\uuuuuuuu变量\u类前缀:标识符\uuuuuuuu AppDelegate类]);
}
对于应用程序:didfishlaunchingwithoptions:method,我在Storyboard application.xctemplate中的路径错误
<key>programming/core/main.m:main:UIApplicationMain</key>
<string>@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([___VARIABLE_classPrefix:identifier___AppDelegate class]));
}
</string>
<key>programming/controllers/___VARIABLE_classPrefix:identifier___AppDelegate.m:applicationdidFinishLaunchingWithOptions</key>
<dict>
<key>Beginning</key>
<string>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.</string>
<key>End</key>
<string> return YES;
}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>
programming/controllers/\uuuuuuuuu VARIABLE\u classPrefix:identifier\uuuuuuuuu AppDelegate.m:applicationdFinishLaunchwithoptions
开始
-(BOOL)应用程序:(UIApplication*)应用程序使用选项完成启动:(NSDictionary*)启动选项
{
//应用程序启动后自定义的覆盖点。
终点
返回YES;
}
缩进
1.
对不起,如果我浪费了任何人的时间来寻找这些问题的答案。想想看,自己花两天时间试图找到这个bug,然后最终决定寻求帮助,并在不久之后找到这个bug:/
希望这对将来的人有所帮助
<key>programming/controllers/___VARIABLE_classPrefix:identifier___AppDelegate.m:applicationdidFinishLaunchingWithOptions</key>
<dict>
<key>Beginning</key>
<string>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.</string>
<key>End</key>
<string> return YES;
}
</string>
<key>Indent</key>
<integer>1</integer>
</dict>