本文是ios开发的学习及开发笔记 不定时更新 一个没入门的ios小白
-
关于window
在使用singleview方式来创建项目的时候,发现 仅能在appdelegate.m中使用self.window.rootViewController是指根控制器,然后使用[self.window makeKeyAndVisible];将窗口显示出来 关于 info.plist的 字典 Main storyboard file base name 这里当设置为空时,有时候会黑屏 即便[self.window makeKeyAndVisible];将指定的根控制器显示出来。 -
自定义启动文件 今天看 apicloud的模块开发代码,发现他讲默认的appdelegate 进行了自定义
#import <uikit uikit.h> int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, @"UZAppDelegate"); } }对比 xcode 10 默认生成的main.m文件
#import <uikit uikit.h> #import "AppDelegate.h" int main(int argc, char * argv[]) { @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } } ```
我们可以看出来 `NSStringFromClass([AppDelegate class])`其实就是`@"AppDelegate"` 也就是 指定启动文件了。
3. 关于打包静态库 注意因为终端的shell显示设置 下面的➜ Products ➜、 Release-iphonesimulator和➜ Release-iphoneos是指的编译成功后 liblaunchModel.a所在的相关目录
1 ➜ Products lipo -create Release-iphoneos/liblaunchModule.a Release-iphonesimulator/liblaunchModule_simulator.a -output liblaunchModule.a 2 ➜ Products lipo -info liblaunchModule.a 3 Architectures in the fat file: liblaunchModule.a are: x86_64 arm64 4
需要使用命令将模拟器和真机进行处理 不然 只能通过lipo -info liblaunchModule.a得到以下两种之一
1 ➜ Release-iphonesimulator lipo -info liblaunchModule.a 2 Non-fat file: liblaunchModule.a is architecture: x86_64 3 ➜ Release-iphoneos lipo -info liblaunchModule.a 4 Non-fat file: liblaunchModule.a is architecture: arm64
4. apicloud更改widget目录
1 APIConfiguration *configuration = [[APIConfiguration alloc] init]; 2 configuration.defaultWidgetPath = [NSString stringWithFormat:@"%@/%@/", [NSBundle mainBundle].bundlePath, @"appfile" ]; 3 ``` 4
5. 其他
使用openwrite发布</uikit></uikit>