Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS - Implicit coercion to 32 bits in the database is not recommended

All,

Please help, I think I am going mad, but I have an existing app which is designed for 32bit standard device. However, when I run on 64bit it's having problems, I am getting the following:

CoreData: warning: Property 'jobId' is a 64 bit scalar type on class 'JobSummary' 
that does not match its entity's property's 32 bit scalar type.  
Implicit coercion to 32 bits in the database is not recommended.

jobId is NSInteger

Is their something I need to do for it to work in both? Currently it's one or the other.

like image 897
Adam Rush Avatar asked Aug 28 '14 08:08

Adam Rush


2 Answers

In Swift you can use something like this:

@NSManaged var jobId: Int32

It works fine on both 32bit and 64bits devices.

like image 142
Sterbic Avatar answered Oct 08 '22 02:10

Sterbic


If it is feasible, transform your scalar values to objects, i.e. NSNumber. In the new model version, make sure you int types are what you need (making them bigger in case you are not sure).

like image 30
Mundi Avatar answered Oct 08 '22 03:10

Mundi