유니티 iOS file system sandbox blocked open() 에러 (Unity) 및 Facebook SDK FBAEMKit 에러

2023. 3. 29. 01:05Unity

유니티 iOS file system sandbox blocked open() 에러 (Unity) 및 Facebook SDK FBAEMKit 에러 

 

 

유니티 iOS file system sandbox blocked open()

 

1번 - 애플 권한 

 

 

  • System Preferences > Security & Privacy > Privacy > Full Disk Access > "add your app such as Xcode"
  • System Preferences > Security & Privacy > Privacy > Files and Folders > "add your app such as Xcode"

 

 

2번

  1. Link binary with UnityFramework

1.1. Build iOS app and open Xcode project.
1.2. In Project navigator select project file
1.3. Select 'Unity-iPhone' target
1.4. Go to 'Build Phases' tab
1.5. In 'Link Binary With Libraries' section click plus icon and 'UnityFramework.framework'
1.6. Build and run. It should work like expected now.

 

 

Facebook SDK FBAEMKit 에러

 

Error loading /var/containers/Bundle/Application/XXX/unity-framework.app/Frameworks/UnityFramework.framework/UnityFramework: dlopen(/var/containers/Bundle/Application/637025C2-0BDB-47ED-B2DE-FB4F05CE05A5/unity-framework.app/Frameworks/UnityFramework.framework/UnityFramework, 0x0109): Library not loaded: @rpath/FBAEMKit.framework/FBAEMKit 

 

Podfile 수정

pod update

 

Managed to fix this by changing Podfile from:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'

target 'UnityFramework' do
  use_frameworks! :linkage => :static
  pod 'FBSDKCoreKit', '~> 14.0'
  pod 'FBSDKCoreKit_Basics', '~> 14.0'
  pod 'FBSDKGamingServicesKit', '~> 14.0'
  pod 'FBSDKLoginKit', '~> 14.0'
  pod 'FBSDKShareKit', '~> 14.0'
end
target 'Unity-iPhone' do
end
use_frameworks!
use_frameworks!

 

to:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'

target 'UnityFramework' do
  use_frameworks! # changed to dynamic linkage
  pod 'FBSDKCoreKit', '~> 14.0'
  pod 'FBSDKCoreKit_Basics', '~> 14.0'
  pod 'FBSDKGamingServicesKit', '~> 14.0'
  pod 'FBSDKLoginKit', '~> 14.0'
  pod 'FBSDKShareKit', '~> 14.0'
end
target 'Unity-iPhone' do
end
use_frameworks!
use_frameworks!