I am having `Entity` Called `EY_Appliances` with Attributes `applianceId` ,`applianceName`,`watts`,`amountPerWatts`.Also i am Having Arrays like this:

Prefrence.h

```
#define APPLIANCENAME_ARRAY @[@"Fridge",@"Microwave",@"Mixie",@"Roti Maker",@"Coffee Machine",@"Dish Washer",@"Wet Grinder",@"Electric Stove",@"Ceiling Fan",@"TV",@"Table Fan",@"Tubelight",@"Bulb",@"AC",@"Vacuum Cleaner",@"CFL",@"LED",@"Washing Machine",@"Toaster",@"Room Heater",@"Iron",@"Motor",@"Water Heater",@"Inverter / UPS",@"Air Cooler",@"Steamer / Air Fryer",@"Hair Dryer",@"Laptop",@"PC",@"Tablet",@"Router / Modem",@"Home Theatre",@"Projector",@"PS3/PS4/XBOX"]

#define WATTS_ARRAY @[@"120",@"1000",@"700",@"30",@"167",@"810",@"180",@"150",@"75",@"120",@"75",@"40",@"60",@"1200",@"1400",@"20",@"6",@"300",@"1000",@"1600",@"1400",@"2400",@"1000",@"67",@"173",@"585",@"1026",@"15",@"150",@"4",@"4",@"17",@"240",@"10"]

```

DataAccessHandler.m

```
-(void)storeApplianceDetailsToEntity
{
NSManagedObjectContext *context = [self managedObjectContext];

for (int i=0; i<APPLIANCENAME_ARRAY.count; i++)
{
    NSManagedObject *object = [NSEntityDescription insertNewObjectForEntityForName:@"EY_Appliances" inManagedObjectContext:context];
    [object setValue: APPLIANCENAME_ARRAY[i] forKey:@"applianceId"];
    [object setValue: APPLIANCENAME_ARRAY[i] forKey:@"applianceName"];
    [object setValue: WATTS_ARRAY[i] forKey:@"watts"];
    [object setValue: WATTS_ARRAY[i] forKey:@"amountPerWatts"];
}

NSError *error = nil;
if (![context save:&error])
{
    NSLog(@"Saving Failed with error %@", error);
}
NSLog(@"entityValue==>%@",context);

}

-(NSArray *) fetchApplianceDetailsFromEntity:(NSString *) entityName
{
NSManagedObjectContext *managedObjectContext = [self managedObjectContext];
NSFetchRequest *fetchRequest;
NSEntityDescription *entityDescription;
NSArray *array;
fetchRequest = [[NSFetchRequest alloc] init];
entityDescription = [NSEntityDescription entityForName:entityName inManagedObjectContext:managedObjectContext];
[fetchRequest setEntity:entityDescription];

array =   [managedObjectContext executeFetchRequest:fetchRequest error:nil];
NSLog(@"arr==>>%@",array);
return array;

}

```

ViewController.m

```
-(void)viewDidLoad
{
DataAccessHandler *dataAccess=[[DataAccessHandler alloc]init];
[dataAccess storeApplianceDetailsToEntity];
NSArray *applianceData = [dataAccess fetchApplianceDetailsFromEntity:@"EY_Appliances"];

//How to print the applianceName,If i write Like this applianceData.applianceName,it shows error…
}

```

1.How to print the applianceName?

2.How to set the applianceId primaryKey and store the value for applianceId 1 to 34?
['https://Stackoverflow.com/questions/35481633', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']
So, I was testing with `Genymotion` because I couldn't get my hands on a device with `Android` 6.0 but now, that I've borrowed one, I've tested this code in that physical device and I was happy to notice that it works.  

Guess it's a `Genymotion` problem. Oh well, code's working.  

Thanks!
could you please use the following code and feed me back with result :-

```
import android.Manifest;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {

    private GoogleMap mMap;
    /**
     * Id to identity READ_CONTACTS permission request.
     */
    private static final int REQUEST_ACCESS_FINE_LOCATION = 0;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_maps);
        // Obtain the SupportMapFragment and get notified when the map is ready to be used.
        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);

        mapFragment.getMapAsync(this);
    }

    /**
     * Manipulates the map once available.
     * This callback is triggered when the map is ready to be used.
     * This is where we can add markers or lines, add listeners or move the camera. In this case,
     * we just add a marker near Sydney, Australia.
     * If Google Play services is not installed on the device, the user will be prompted to install
     * it inside the SupportMapFragment. This method will only be triggered once the user has
     * installed Google Play services and returned to the app.
     */
    @Override
    public void onMapReady(GoogleMap googleMap) {
        mMap = googleMap;
        // Sets the map type to be "hybrid"
        mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
        // Add a marker in Sydney and move the camera
        LatLng sydney = new LatLng(-34, 151);
        mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
        mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));

        if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
            // TODO: Consider calling
            //    ActivityCompat#requestPermissions
            // here to request the missing permissions, and then overriding
            //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
            //                                          int[] grantResults)
            // to handle the case where the user grants the permission. See the documentation
            // for ActivityCompat#requestPermissions for more details.
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
                requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_ACCESS_FINE_LOCATION);
            }
            return;
        }
        mMap.setMyLocationEnabled(true);
    }

    /**
     * Callback received when a permissions request has been completed.
     */
    @Override
    public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
                                           @NonNull int[] grantResults) {
        if (requestCode == REQUEST_ACCESS_FINE_LOCATION) {
            if (grantResults.length == 1 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                startActivity(getIntent());
                finish();
            }
        }
    }
}

```