azarovalex / azChat-macOS

This macOS chat app uses a remote server for sync and storing messages.
4 stars 1 forks source link

Fatal runtime error #2

Open GLinnik21 opened 6 years ago

GLinnik21 commented 6 years ago

App crashes during launching with code: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) at SocketService.swift file. You trying to unwrap nil optional. Have you tried using guard operator?

GLinnik21 commented 6 years ago

It's not actually the first

GLinnik21 commented 6 years ago

It crashes coz your $(BASE_URL) entity in Info.plist is empty. I kinda understand what you're trying to implement. Is it that thing with different building options with .xconfig files?

azarovalex commented 6 years ago

$(BASE_URL) is a user-defined build setting in the target build settings. I have multiple options for different build configuration and missed one for Debug configuration. Try to run the app with Production scheme.

GLinnik21 commented 6 years ago

Yeah, I meant that, but where are these configurations defined?

azarovalex commented 6 years ago

Each scheme has its own build configs for Run/Build/Production/etc. You can manage your list of configurations in the Project tab at the right, and add user-defined settings at the bottom of the Build Settings at the right.

screen shot 2018-01-16 at 00 07 40

Actually, I don't have any experience in sharing these settings via version control system.

GLinnik21 commented 6 years ago

I don't know which approach is better, but I use this one: Using xcconfig files for your XCode Project

GLinnik21 commented 6 years ago

I guess it is simpler to define in simple key-value file than in xml with entities that you don't actually need to configure.