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:
- Make sure the Context is properly initialized:
// Ensure context is not nil
guard let context = context else { return nil }
- Verify the frame values:
let view: KMViewContainer = KMViewContainer(frame: CGRect(
x: 0,
y: 0,
width: UIScreen.main.bounds.width,
height: UIScreen.main.bounds.height
))
- Ensure the Coordinator is properly created:
if let coordinator = context.coordinator {
coordinator.createController(view)
}
- 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.