Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBX-3168: IDFA Example sample #450

Merged
merged 8 commits into from
Oct 9, 2024

Conversation

justSmK
Copy link
Contributor

@justSmK justSmK commented Oct 8, 2024

[iOS] Невозможность проверки IDFA/IDFV до инициализации приложения#3168

@justSmK justSmK requested a review from Vailence October 8, 2024 07:23
@justSmK justSmK self-assigned this Oct 8, 2024
@justSmK
Copy link
Contributor Author

justSmK commented Oct 8, 2024

Возможно if #available iOS 14 здесь излишне

@@ -59,6 +61,26 @@ public struct SwiftDataManager {
}
}
}

private static func createDirectoryForSwiftData() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что за рефактор?)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Давно про это тебе рассказывал. Там CoreData под капотом ругается на первый запуск у всех. И выводит это в std. Мешает читать консоль. В нашем случае решил обработать ситуацию и пофиксить, чтобы и у клиентов вопросов меньше было, и нам самим удобно было

Что выводит
CoreData: error: Failed to stat path '/private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65/Library/Application Support/default.store', errno 2 / No such file or directory.
CoreData: error: Executing as effective user 501
CoreData: error: Failed to statfs file; errno 2 / No such file or directory.
CoreData: error: Logging status information for directory path: /private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65/Library/Application Support
CoreData: error: Executing as effective user 501
CoreData: error: Information for /
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		838860801
CoreData: error:   File Size: 		544 bytes
CoreData: error:   File inode: 		2
CoreData: error:   File user ID: 		0
CoreData: error:   File group ID: 		0
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is readable
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		838860801
CoreData: error:   File Size: 		224 bytes
CoreData: error:   File inode: 		1152921500312264884
CoreData: error:   File user ID: 		0
CoreData: error:   File group ID: 		0
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is readable
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777224
CoreData: error:   File Size: 		1152 bytes
CoreData: error:   File inode: 		2
CoreData: error:   File user ID: 		0
CoreData: error:   File group ID: 		0
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is not readable with errno 1
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var/mobile
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777220
CoreData: error:   File Size: 		480 bytes
CoreData: error:   File inode: 		2
CoreData: error:   File user ID: 		501
CoreData: error:   File group ID: 		501
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   711
CoreData: error:   component is not a symbolic link
CoreData: error:   component is not readable with errno 1
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var/mobile/Containers
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777220
CoreData: error:   File Size: 		160 bytes
CoreData: error:   File inode: 		45
CoreData: error:   File user ID: 		501
CoreData: error:   File group ID: 		501
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is not readable with errno 1
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var/mobile/Containers/Shared
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777220
CoreData: error:   File Size: 		96 bytes
CoreData: error:   File inode: 		11907
CoreData: error:   File user ID: 		0
CoreData: error:   File group ID: 		501
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is not readable with errno 1
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var/mobile/Containers/Shared/AppGroup
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777220
CoreData: error:   File Size: 		8352 bytes
CoreData: error:   File inode: 		11908
CoreData: error:   File user ID: 		501
CoreData: error:   File group ID: 		501
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is not readable with errno 1
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777220
CoreData: error:   File Size: 		256 bytes
CoreData: error:   File inode: 		41717936
CoreData: error:   File user ID: 		501
CoreData: error:   File group ID: 		501
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is readable
CoreData: error:   component is not writeable with errno 1
CoreData: error: Information for /private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65/Library
CoreData: error:   File Device ID: 	0
CoreData: error:   Device ID: 		16777220
CoreData: error:   File Size: 		128 bytes
CoreData: error:   File inode: 		41717938
CoreData: error:   File user ID: 		501
CoreData: error:   File group ID: 		501
CoreData: error:   File Permissions: 	
CoreData: error: d
CoreData: error:   755
CoreData: error:   component is not a symbolic link
CoreData: error:   component is readable
CoreData: error:   component is writeable
CoreData: error: Failed to stat path '/private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65/Library/Application Support', errno 2 / No such file or directory.
CoreData: error: addPersistentStoreWithType:configuration:URL:options:error: returned error NSCocoaErrorDomain (512)
CoreData: error: userInfo:
CoreData: error: 	reason : Failed to create file; code = 2
CoreData: error: storeType: SQLite
CoreData: error: configuration: default
CoreData: error: URL: file:///private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65/Library/Application%20Support/default.store
CoreData: annotation: options:
CoreData: annotation: 	NSMigratePersistentStoresAutomaticallyOption : 1
CoreData: annotation: 	NSInferMappingModelAutomaticallyOption : 1
CoreData: annotation: 	NSPersistentStoreRemoteChangeNotificationOptionKey : 1
CoreData: annotation: 	NSPersistentHistoryTrackingKey : 1
CoreData: error: <NSPersistentStoreCoordinator: 0x301768380>: Attempting recovery from error encountered during addPersistentStore: 0x3032f5ad0 Error Domain=NSCocoaErrorDomain Code=512 "The file couldn’t be saved." UserInfo={reason=Failed to create file; code = 2}
CoreData: error: During recovery, parent directory path reported as missing
CoreData: error: Recovery attempt while adding <NSPersistentStoreDescription: 0x3032f5ad0> (type: SQLite, url: file:///private/var/mobile/Containers/Shared/AppGroup/7E0865CC-DA07-473B-B7ED-18417EFD4D65/Library/Application%20Support/default.store) was successful!

Example/Samples/AppDelegate_IDFA.swift Outdated Show resolved Hide resolved
@justSmK justSmK merged commit c555b2c into develop Oct 9, 2024
1 check passed
@justSmK justSmK deleted the technicalDebt/MBX-3168-IDFA_Example_sample branch October 9, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants