Exc_bad_access


샘플 예제대로 했는데 이부분에서 exc_bad_access오류가 뜹니다…

I see you’re getting an EXC_BAD_ACCESS error when creating the view. This typically indicates a memory access error. Here are several checkpoints I can suggest for resolving this:

  1. Make sure the Context is properly initialized:
// Ensure context is not nil
guard let context = context else { return nil }
  1. Verify the frame values:
let view: KMViewContainer = KMViewContainer(frame: CGRect(
    x: 0,
    y: 0, 
    width: UIScreen.main.bounds.width,
    height: UIScreen.main.bounds.height
))
  1. Ensure the Coordinator is properly created:
if let coordinator = context.coordinator {
    coordinator.createController(view)
}
  1. Make sure your API key (APP_KEY) is properly defined:
// KAKAO_APP_KEY should be defined in Info.plist
// or
KMViewContainer.setAppKey("YOUR_APP_KEY")

If the issue persists after these checks, you might want to verify:

  • That the Kakao SDK is properly integrated in your project settings
  • All required frameworks are included
  • Deployment target and SDK versions are compatible

If you’re still experiencing the error, please share the complete error message and your project configuration for more detailed assistance.