//

Error: expected identifier or '('

Error: expected identifier or '(' discussie in Ontwikkelen voor iOS forum; ( verdwijnt na registratie ) Als ik deze code wil plaatsen om te checken of healthkit aanwezig is krijg ik Error: expected identifier or '(' if(NSClassFromString(@"HKHealthStore") && [HKHealthStore isHealthDataAvailable]){ }...



Ga terug   iPhone, iPod touch, iPad en Apple TV forum > Development > Ontwikkelen voor iOS
Wachtwoord vergeten? Registreren!
Registreer FAQ Ledenlijst Kalender Berichten van vandaag

Reageren

 

Discussietools Weergave
  #1  
Oud 13-04-15, 16:55
techchunky techchunky is offline
• iOS 9.1
• 9.1
• Besturingssysteem: Mac OS X
 
Geregistreerd: Feb 2015
Berichten: 11
Standaard Error: expected identifier or '('

Als ik deze code wil plaatsen om te checken of healthkit aanwezig is krijg ik Error: expected identifier or '('

if(NSClassFromString(@"HKHealthStore") && [HKHealthStore isHealthDataAvailable]){

}
Advertentie
Advertentie Gesponsorde links (verdwijnt na registratie)

  #2  
Oud 13-04-15, 17:32
XIII's schermafbeelding
XIII XIII is offline
iPhone(club) Guru
• iOS 16.1
• iPadOS 16.1
• Besturingssysteem: macOS
 
Geregistreerd: Jul 2009
Berichten: 10.082
Standaard

Zet eens haakjes om de volledige guard (boolean conditie) van het if statement?
__________________
We are one, but we are not the same... Talk to each other!
  #3  
Oud 13-04-15, 23:24
techchunky techchunky is offline
• iOS 9.1
• 9.1
• Besturingssysteem: Mac OS X
 
Geregistreerd: Feb 2015
Berichten: 11
Standaard Gefixed

Ik had hem niet in de viewdidload functie gezet
door hem daarin te zetten doet hij het natuurlijk
  #4  
Oud 14-04-15, 09:41
XIII's schermafbeelding
XIII XIII is offline
iPhone(club) Guru
• iOS 16.1
• iPadOS 16.1
• Besturingssysteem: macOS
 
Geregistreerd: Jul 2009
Berichten: 10.082
Standaard

Ah, dat was zonder context niet te zien.

En ik had zelf de haakjes in jouw voorbeeld fout gelezen...
Reageren

Labels
healthkit, objective-c



Er zijn 1 actieve gebruikers die momenteel deze discussie bekijken (0 leden en 1 gasten)

 

Soortgelijke discussies

Discussie Auteur Forum Reacties Laatste bericht
Protube foutmelding bij Downloaden: "Expected Status Code in (200-299), Got 403" rosh Jailbreak apps en thema's 8 16-01-14 14:18
Code Sign error: a valid provisioning profile matching the application's Identifier ' koninglol Ontwikkelen voor iOS 6 01-04-11 10:35
Error from debugging: Error launching remote program" security policy error. Tim14ww Ontwikkelen voor iOS 5 09-05-09 17:21
Wat in te vullen bij Bundle Identifier Tim14ww Ontwikkelen voor iOS 3 26-03-09 21:22

Regels voor berichten
Je mag geen nieuwe discussies starten
Je mag niet reageren op berichten
Je mag geen bijlagen versturen
Je mag niet je berichten bewerken

BB code is Aan
Smileys zijn Aan
[IMG]-code is Aan
HTML-code is Uit
Trackbacks are Aan
Pingbacks are Aan
Refbacks are Uit



Alle tijden zijn GMT +2. Het is nu 03:52.