草庐IT

my_launch

全部标签

ios - 在 Xcode 7、iOS 9 "Application windows are expected to have a root view controller at the end of application launch"

我的控制台出现错误并崩溃。“Applicationwindowsareexpectedtohavearootviewcontrollerattheendofapplicationlaunch”下面是我的一段代码,输入返回YES行后会发生崩溃。-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{UIImageView*defaultImage=[[UIImageViewalloc]initWithImage:splashImage]

C++ : TCP Server "bind" function failed (errno 98) if I do not wait enough time between two consecutive app launch

这个问题在这里已经有了答案:WhataretheusecasesofSO_REUSEADDR?(2个答案)关闭6年前。发现TCPsocket,根据自己对题目的理解和网上找的tuto做了一个很简单的测试服务器:voidServer(void){intlocalSocket;intdistantSocket;sockaddr_inserverInfo;sockaddr_inclientInfo;intsizeOfSocketInfo=sizeof(structsockaddr_in);/*OpenSocket*/std::cout和客户:voidClient(void){intlocalS

C 套接字 : why is my server appending extra characters in the end?

我正在用C编写一个简单的服务器/客户端套接字。客户端要求用户输入一条消息,服务器通过重复相同的内容进行响应。问题是当我从客户端发送消息时,服务器通过附加额外字符进行响应。我该如何解决这个问题。这是我的客户端代码while(1){bzero(buffer,BUFSIZE);printf("EnterMessage:");scanf("%s",buffer);//sendsomedataif(send(socket_fd,buffer,strlen(buffer),0)这是我的服务器代码intread_size;while((read_size=recv(client_socket_fd,

ios - 页面 View Controller : SetViewController Crashes my App

当我运行我的应用程序时,我注意到setViewController方法导致内存链接并使我的应用程序崩溃。我已经处理这个问题几个小时,并尝试在网上查找,并找到一post,其中提到将我的setViewController方法放在dispatch_async(dispatch_get_main_queue)中,但这会终止应用程序,并且我在控制台中收到以下错误:2015-12-2619:41:55.596HarishYerra[4663:132796]XPCconnectioninterrupted2015-12-2619:41:55.596HarishYerra[4663:132797]Te

swift - iOS 13 SwiftUI : app crashes upon launch on real device

在SwiftUI和Apple的新测试版(macOS10.15、iOS13和Xcode11)发布后,我开始开发基于新技术构建的应用程序。考虑到所涉及的所有软件和系统都处于测试阶段,开发进展顺利。然而,当尝试在真实设备(iPhone8Plus,运行iOS13beta2)上运行基于SwiftUI的应用程序时,该应用程序拒绝启动,而是在启动时崩溃并显示一个简单的(lldb)在Xcode调试器中。该应用程序在模拟器中运行正常,并且Xcode没有提供任何有用的消息来说明为什么该应用程序无法在真实设备上运行。tl;dr在iOS13模拟器中成功运行后,SwiftUI应用在真正的iOS13设备上启动时崩

ios - 无法通过在 <My App> 中打开共享表 : no file at the provided file URL exists 从 iOS 文件应用程序打开文件

我的iOS应用程序可以打开CSV文件,以便导入它们的数据。我可以通过UIDocumentPickerViewController从应用程序中打开文件,没有任何问题,选择文件应用程序中显示的文件。但是,当首先在"file"应用程序中查看文件,然后从那里打开我的应用程序(通过“打开方式”共享表)时,我的应用程序无法在传递给我的应用程序的URL上看到该文件。该文件似乎不存在。我将以下调试代码添加到我的AppDelegate中:funcapplication(_app:UIApplication,openurl:URL,options:[UIApplication.OpenURLOptions

iOS(结构): Crashlytics crashing app on launch

我已经更新了Crashlytics,但在启动时仍然出现此错误:Error:***Terminatingappduetouncaughtexception'FABException',reason:'[Fabric]Itappearsthat"Crashlytics"isnotavalidFabricKit.PleasemakesureyouonlypassFabricKitsto[Fabricwith:].'这是我的代码:funcapplication(application:UIApplication,didFinishLaunchingWithOptionslaunchOption

ios - cellForRow(在 : indexPath) returns nil and crashes my swift app

在我的swift应用程序中,我在UITableView中显示单元格,前10个单元格包含一张照片。我决定为每个单元格添加视差效果,这样当用户上下滚动表格时-图像会改变它的偏移量。这是我从我的网络服务中获取数据并将其最初添加到TableView的方式:funcmakePostQueryForFetchingData(_parameters:[String:AnyObject],url:String,type:String){Alamofire.request(url,method:.post,parameters:(parameters),encoding:JSONEncoding.def

php - swift 错误 : Error Domain=NSCocoaErrorDomain Code=3840 "Problems with my Login Controller "

这是我的代码,我无法编译它。我正在尝试登录到我的服务器,但它不允许我这样做抱歉,我是编程新手,我研究过stackoverflow,关于这个错误,我只能解析字典或数组。但我通过复制我的JSON响应进行了搜索,但它不起作用。任何建议都会有帮助!!importUIKitclassLogin:UIViewController{@IBOutletvarUsername:UITextField!@IBOutletvarPassword:UITextField!@IBActionfuncLogin(sender:UIButton){letusername=Username.textletpasswo

ios - AVAudioSession : Some Bluetooth devices are not working properly on my App

我正在使用AVAudioSession开发一个快速的音频/视频和文本聊天iOS应用程序。每当我选择使用某些蓝牙设备时,设备上播放的声音不是App音频流。每当发送/接收消息时,它们只播放文本聊天库发送的系统声音。它不会在所有蓝牙设备上发生,在其中一些设备上一切正常。在内置麦克风和扬声器上,该应用程序也能正常工作。以下是我类用于管理设备的最重要的方法:classMyAudioSession{privatevarmAudioSession:AVAudioSession;init!(){self.mAudioSession=AVAudioSession.sharedInstance();do{