Declaring extern NSString causes linker error

后端 未结 4 1651
旧巷少年郎
旧巷少年郎 2021-02-07 11:17

This is ridiculous, im trying to create a sound bool to turn of in app sounds. I keep getting

Undefined symbols for architecture i386:
\"_kPlaySoundPrefsKey\",         


        
4条回答
  •  滥情空心
    2021-02-07 12:15

    Thanks for your help guys

    I added

    NSString *kPlaySoundPrefsKey = @"playSoundKey";

    [[NSUserDefaults standardUserDefaults] registerDefaults:defaultDict];

    to app delegate. That fixed it

提交回复
热议问题