Posts

Post not yet marked as solved
0 Replies
463 Views
I have been developing my app and testing against an iPhone 8 simulator with no problems during the develoopment phase.The app works by taking the user to their photo album when it starts where the user is able to select a photo for editing. Once the user has given access to their photo album the available photos are displayed in a grid.Today I decided to test it running on other simulators (e.g. iPhone 11 Pro). Upon starting, the user is asked to permit sccess to the photo album. Upon giving access, the app crashes. If I then start the app again it works fine.I really don't know what the problem is. The log message seem to indicate a SQLite problem. I am not using SQLite in my code directly.Here's an extract of the start of the log messages I see upon crashing:2020-01-26 12:11:34.728080+0000 BrickArt[3337:420337] [error] error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///Users/wayne/Library/Developer/CoreSimulator/Devices/763DCD5F-2F8B-484A-869B-8A0FE88F91CC/data/Media/PhotoData/Photos.sqlite options:{ NSPersistentHistoryTrackingKey = { NSPersistentHistoryAllowPartialHistoryMigration = 1; NSPersistentHistoryTrackingEntitiesToExclude = ( AssetAnalysisState, MediaAnalysisAssetAttributes, ComputedAssetAttributes, SceneClassification ); NSPersistentHistoryUseContextObjectsForDeletes = 1; }; NSPersistentStoreFileProtectionKey = NSFileProtectionCompleteUntilFirstUserAuthentication; NSSQLitePersistWALOption = 1; NSSQLitePragmasOption = { "journal_mode" = WAL; "wal_autocheckpoint" = 0; }; } ... returned error NSCocoaErrorDomain(134100) with userInfo dictionary { metadata = { ImportedFileSystemAssets = 1; ImportedFileSystemAssetsDate = "2017-01-19 19:37:00 +0000"; "MetadataArchive_10152" = { ImportedFileSystemAssets = 1; ImportedFileSystemAssetsDate = "2017-01-19 19:37:00 +0000"; NSPersistenceFrameworkVersion = 863; NSStoreUUID = "3F642A05-50EB-4DB3-8C26-3554B5F25849"; PLLibraryUpgradeType = Lightweight; PLMigrationDate = "2017-01-19 19:36:51 +0000"; PLMigrationSourceModelVersion = 9047; PLModelVersion = 10152; PLOSVersion = "16E144"; }; "MetadataArchive_9047" = { ImportedFileSystemAssets = 1; ImportedFileSystemAssetsDate = "2015-09-02 20:02:20 +0000"; NSPersistenceFrameworkVersion = 752; NSStoreUUID = "3F642A05-50EB-4DB3-8C26-3554B5F25849"; PLLibraryUpgradeType = Rebuild; PLMigrationDate = "2015-09-02 20:02:04 +0000"; PLModelVersion = 9047; PLOSVersion = "15A281"; }; NSPersistenceFrameworkVersion = 863; NSStoreModelVersionHashes = { AdditionalAssetAttributes = {length = 32, bytes = 0x4d0f13cb b38385f3 c3a63c7d ac6edf03 ... 06330605 ae53c32d }; Adjustment = {length = 32, bytes = 0x80c158a6 bc060506 f3df23da 0434c82b ... 60d8b275 ddf51b98 }; Album = {length = 32, bytes = 0x74afd424 76f3c346 159265ca 0693559d ... 98cb0544 1058a8bd }; AlbumList = {length = 32, bytes = 0xd200a101 cddb3241 9b161e1a 47584e03 ... 88f6daa4 bc406a36 }; Asset = {length = 32, bytes = 0x53e0f0ce 9325a0d5 6b415ef4 321ca459 ... 3128507f 6b88e9f7 }; AssetAnalysisState = {length = 32, bytes = 0x0904fec0 1b87e610 33b9d3be e34937c3 ... 7465e275 3ca984f4 }; AssetDescription = {length = 32, bytes = 0xbcf1df7a 47f359c3 78df6ab0 c7e21a64 ... 8e123f62 beaeff67 }; CloudFeedAssetsEntry = {length = 32, bytes = 0x559a45e6 564836f3 37e5f416 a2a8c82d ... 7eaea1d4 a3095b8e }; CloudFeedCommentsEntry = {length = 32, bytes = 0xfe3efc97 d831852d 36ee40db 292d9022 ... f912b1b0 2c863335 }; CloudFeedEntry = {length = 32, bytes = 0x555ebf70 34e2f684 aedecbe1 661721e2 ... 9eea7c27 8e1a9d79 }; CloudMaster = {length = 32, bytes = 0x746824dd d27761db d4a03fb9 c8990d7a ... c46c555b 55a41e36 }; CloudMasterMediaMetadata = {length = 32, bytes = 0x15687a91 d8d834db 39bfd32e 34dba948 ... d50cce7d 8f4f7cf8 }; CloudResource = {length = 32, bytes = 0x33cf09c9 38ed5eb1 4d36f832 fc0afaf8 ... b3f18740 f8efcf53 }; CloudSharedAlbum = {length = 32, bytes = 0x1950e033 e3fd4827 2e47808b 891de152 ... f7bb69be 06190328 }; CloudSharedAlbumInvitationRecord = {length = 32, bytes = 0xb148ee93 11dad2a0 d71c7e5d d24059f8 ... 096c82a1 35729edd }; CloudSharedComment = {length = 32, bytes = 0xd2fb2f6d 12eb4951 4b335dd8 01ffcd54 ... 61facd66 feeb3be0 }; Codec = {length = 32, bytes = 0x312db077 e011e571 116debfd f2dea6d2 ... e1e71dbf 9bedd0ed }; ColorSpace = {length = 32, bytes = 0x6eccc5b6 4a6550b3 09105621 205767ec ... 67ac1e8e 5c5b3d1e }; ComputedAssetAttributes = {length = 32, bytes = 0x234b8f71 b08569c7 10acb7b3 64cbba9f ... c43eefe7 59f472cb }; DeferredRebuildFace = {length = 32, bytes = 0x36bf3bb1 4a554639 0197889e 12ccd9e6 ... 6d791d14 0f6840b0 }; DetectedFace = {length = 32, bytes = 0x25cfd156 59387dd8 09843870 e5b07113 ... f606b63c 920d8a50 }; DetectedFaceGroup = {length = 32, bytes = 0xf2aa5546 3896cafa c8c05e58 a4fbb88d ... 078f9332 19e4721b }; DetectedFaceprint = {length = 32, bytes = 0x595d5adb 415167f0 b30a8690 27e0ad2f ... 1e27c8af de296b21 }; FaceCrop = {length = 32, bytes = 0xe72e74ef 184081f2 7bba9e26 066dbb0e ... 2838f2b4 d7773c96 }; FetchingAlbum = {length = 32, bytes = 0x256a4972 b52add26 f77daed3 22097fd0 ... 57845aea 0ce7004e }; Folder = {length = 32, bytes = 0x0ca1d9f9 b01ac8c8 7017120e 862e5aa1 ... e755000d bfa928c0 }; GenericAlbum = {length = 32, bytes = 0x92f677ea 40a1bed3 995acfe5 79a4ee35 ... 85873d18 5a86014a }; GenericAsset = {length = 32, bytes = 0x72e7c3c8 a1bddcec 8a9cd2e1 5fd28db3 ... ec12c22a 1f032871 }; ImportSession = {length = 32, bytes = 0xca0e249a 81f151c7 c33d5561 f39bc50e ... 4b2900cf 3939ce54 }; InternalResource = {length = 32, bytes = 0xe6f6759a 30f3953e 013feb2a c659591c ... d62bd6de f6d646a2 }; InternalResourceCloudAttributes = {length = 32, bytes = 0xd79dceac 469b0f3e db989a53 6ecd53df ... e1885e97 d93bec09 }; Keyword = {length = 32, bytes = 0x430a24fa 9e3bf9e7 ac5a3b4c baed06e2 ... 33d2ec1c a9d158af }; LegacyFace = {length = 32, bytes = 0x61f96d6f 8069cc89 25cd22f9 5ab7a765 ... d12569c2 3d4d0748 }; LegacyFaceAlbum = {length = 32, bytes = 0x615dc19a d458d961 6cb7f2f1 8fcf2c04 ... 9ab918f9 3edf563e }; MediaAnalysisAssetAttributes = {length = 32, bytes = 0x0d00b7d8 a57f1efc 50c6d35b d2f0545d ... 98b5b5ac 6eb49ee2 }; Memory = {length = 32, bytes = 0xb33fc73a f6195820 ee91e8a5 57594062 ... e2eb4ee2 e52a8590 }; Moment = {length = 32, bytes = 0x555768b4 02039142 affad5b7 87a05a8d ... b78e3051 e800406c }; MomentList = {length = 32, bytes = 0x38dbf053 e3bbfd01 e9ab5080 bed67955 ... 86df9c8e 06fb0926 }; MomentShare = {length = 32, bytes = 0xde65c8d9 9b31e6d4 a88365d3 607df504 ... e5689049 d2273312 }; MomentShareParticipant = {length = 32, bytes = 0x2f01c561 58f20ca8 9cbb3fa9 4e50533d ... 8322796a 6e598a2f }; Person = {length = 32, bytes = 0x5ba73973 e86b36f0 1fbe2fca 7abcbbc5 ... c0079c8a 6fde9e63 }; PersonReference = {length = 32, bytes = 0x34c68274 75a7d454 ef09c333 9b80d6df ... f0611a3b 5e77dcb2 }; PhotoStreamAlbum = {length = 32, bytes = 0x5a330edb d7eb5f83 69c3919c 4bc2d636 ... 377aff8c a6ce2b0c }; PhotosHighlight = {length = 32, bytes = 0xbfe82416 990381ef ffd5a545 29a5787e ... 046a1d7c 0f3db2b1 }; PhotosHighlightCollection = {length = 32, bytes = 0xd42740fe 3a3afaf8 da6f3b27 36265aec ... 0b60bf0e 578cb8b4 }; SceneClassification = {length = 32, bytes = 0x08d353e5 4e67dc0a a9b113bd 541136aa ... 01ee8aa2 03214e1b }; Sceneprint = {length = 32, bytes = 0xea6abf9c 4cf5065a 15251120 1b0b6580 ... 412b8caa b001870e }; SearchData = {length = 32, bytes = 0xc6b3c358 301ebf4b 28cba1ab b99e5835 ... 9815ae76 5bb87497 }; SidecarFile = {length = 32, bytes = 0x35ed81f2 3e71d876 86f9f078 b1dee8e9 ... 942d280e 8cf5cc67 }; Suggestion = {length = 32, bytes = 0x1648dc7d b85d9375 bb6b4309 41aed8cd ... 62f20b47 f8a7bf1b }; UniformTypeIdentifier = {length = 32, bytes = 0x23a88546 6e1b43ca 2c0493fa 92f48475 ... b518d1af 72b44df9 }; UnmanagedAdjustment = {length = 32, bytes = 0x4a8bf803 b0eeeea0 d0315b82 5b313e3e ... a02bf49e c211871e }; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( "" ); NSStoreType = SQLite; NSStoreUUID = "3F642A05-50EB-4DB3-8C26-3554B5F25849"; PLLibraryUpgradeType = Lightweight; PLMigrationDate = "2018-07-07 06:17:25 +0000"; PLMigrationSourceModelVersion = 10152; PLModelVersion = 12108; PLOSVersion = "18A324"; "_NSAutoVacuumLevel" = 2; "_NSStoreAncillaryModelVersionHashesMetadataKey" = { NSPersistentHistoryTrackingKey = { CHANGE = {length = 32, bytes = 0xf289cc97 719c0c99 3389d0cb f6d37a82 ... 4ed9f427 59d4915a }; TRANSACTION = {length = 32, bytes = 0x2570b0b7 21ae42ce 17f5d2b5 1eed64e6 ... abeb5b6d 927cf84c }; TRANSACTIONSTRING = {length = 32, bytes = 0x96815cbd f70c83e7 ae46b28f 82874980 ... dcf7d99b c33bf4c8 }; }; }; }; reason = "The model used to open the store is incompatible with the one used to create the store"; }Here is the code in my app:override func viewDidLoad() { super.viewDidLoad() PHPhotoLibrary.shared().register(self) reloadAssets() } func photoLibraryDidChange(_ changeInstance: PHChange) { if PHPhotoLibrary.authorizationStatus() == PHAuthorizationStatus.authorized { DispatchQueue.main.async { [unowned self] in self.reloadAssets() } } }One thing I notice is that if I don't invoke PHPhotoLibrary.shared().register(self), the app works and doesn't crash. However, it seems I need this line otherwise the change callback function doesn't get called after the user gives access and subsequently the photos don't appear in the grid.Thanks,Wayne
Posted
by Wh1974.
Last updated
.
Post not yet marked as solved
1 Replies
603 Views
I am based in the UK and have just signed up to the Apple Developer Program and am trying to get my head around the legal stuff related to tax. I really feel like giving up but have spent a great deal of time developing an app which I would like to sell.I appreciate that any income I make on app sales will need to be declared on my annual self assessment in the UK but I am unsure whether I need to file any figures related to my income to the IRS in the US?Any help you can give me would be much appreciated.Wayne.
Posted
by Wh1974.
Last updated
.